def add_difshell(comp, i, shell_thickness, shell_radius): new_name = comp.path.split('[')[0] + '/' + \ comp.name + '/' + difshell_name + str(i) dif = moose.DifShell(new_name) #dif.C = Ca_initial dif.Ceq = Ca_basal dif.D = dca dif.valence = 2 dif.leak = 0 dif.shapeMode = 0 dif.length = comp.length dif.diameter = 2 * shell_radius dif.thickness = shell_thickness return dif
def addCaDifShell(comp, shellMode, shellDiameter, shellThickness, name, capar): name = strip_brackets(comp) + '/' + capar.CaName + '_' + name dif = moose.DifShell(name) dif.Ceq = capar.Ceq dif.D = capar.DCa dif.valence = 2 dif.leak = 0 dif.shapeMode = shellMode dif.thickness = shellThickness if shellMode: dif.diameter = comp.diameter dif.length = shellThickness else: dif.length = comp.length dif.diameter = shellDiameter return dif
def addCaDifShell(comp, shellMode, shellDiameter, shellThickness, name, capar): shellName = '' for s in comp.path.split('[0]'): shellName += s name = shellName + '/' + capar.CaName + '_' + name dif = moose.DifShell(name) dif.Ceq = capar.Ceq dif.D = capar.DCa dif.valence = 2 dif.leak = 0 dif.shapeMode = shellMode dif.thickness = shellThickness if shellMode: dif.diameter = comp.diameter dif.length = shellThickness else: dif.length = comp.length dif.diameter = shellDiameter return dif