示例#1
0
def add_difbuffer_to_dishell(comp, i, j, shell_thickness, shell_radius):
    new_name = comp.path.split('[')[0] + '/' + comp.name + \
        '/' + difshell_name + str(i) + '_' + difbuff_name + str(j)
    buf = moose.DifBuffer(new_name)
    buf.bTot = btotal
    buf.shapeMode = 0
    buf.length = comp.length
    buf.diameter = 2 * shell_radius
    buf.thickness = shell_thickness
    buf.kf = kf
    buf.kb = kb
    buf.D = d
    return buf
示例#2
0
def addDifBuffer(comp, dShell, bufparams, bTotal):
    name = strip_brackets(dShell) + '_' + bufparams.Name

    dbuf = moose.DifBuffer(name)
    dbuf.bTot = bTotal
    dbuf.kf = bufparams.kf
    dbuf.kb = bufparams.kb
    dbuf.D = bufparams.D
    dbuf.shapeMode = dShell.shapeMode
    dbuf.length = dShell.length
    dbuf.diameter = dShell.diameter
    dbuf.thickness = dShell.thickness

    moose.connect(dShell, "concentrationOut", dbuf, "concentration")
    moose.connect(dbuf, "reactionOut", dShell, "reaction")

    return dbuf