Пример #1
0
u.registerIntegrator(vv)
u.setIntegrator(vv, pvSolvent)

meshRbc = ymr.ParticleVectors.MembraneMesh("rbc_mesh.off")
pvRbc = ymr.ParticleVectors.MembraneVector("rbc", mass=1.0, mesh=meshRbc)
icRbc = ymr.InitialConditions.Membrane([[
    0.5 * domain[0], 0.5 * domain[1], 0.5 * domain[2], 0.7071, 0.0, 0.7071, 0.0
]])

u.registerParticleVector(pvRbc, icRbc)

prm_rbc = ymr.Interactions.MembraneParameters()
prm_bending_rbc = ymr.Interactions.KantorBendingParameters()

if prm_rbc:
    set_lina(1.0, prm_rbc)
if prm_bending_rbc:
    set_lina_bending(1.0, prm_bending_rbc)

int_rbc = ymr.Interactions.MembraneForcesKantor("int_rbc",
                                                prm_rbc,
                                                prm_bending_rbc,
                                                stressFree=True)

if args.subStep:
    integrator = ymr.Integrators.SubStepMembrane('substep_membrane', substeps,
                                                 int_rbc)
    u.registerIntegrator(integrator)
    u.setIntegrator(integrator, pvRbc)
else:
    u.setIntegrator(vv, pvRbc)
Пример #2
0
u.registerParticleVector(pvSolvent, icSolvent)
u.registerIntegrator(vv)
u.setIntegrator(vv, pvSolvent)

meshRbc = ymr.ParticleVectors.MembraneMesh("rbc_mesh.off")
pvRbc = ymr.ParticleVectors.MembraneVector("rbc", mass=1.0, mesh=meshRbc)
icRbc = ymr.InitialConditions.Membrane([[
    0.5 * domain[0], 0.5 * domain[1], 0.5 * domain[2], 0.7071, 0.0, 0.7071, 0.0
]])

u.registerParticleVector(pvRbc, icRbc)

prmRbc = ymr.Interactions.MembraneParameters()

if prmRbc:
    set_lina(1.0, prmRbc)
    prmRbc.dt = dt

intRbc = ymr.Interactions.MembraneForces("int_rbc", prmRbc, stressFree=True)

if args.subStep:
    integrator = ymr.Integrators.SubStepMembrane('substep_membrane', dt,
                                                 substeps, intRbc)
    u.registerIntegrator(integrator)
    u.setIntegrator(integrator, pvRbc)
else:
    u.setIntegrator(vv, pvRbc)
    u.registerInteraction(intRbc)
    u.setInteraction(intRbc, pvRbc, pvRbc)

bb = ymr.Bouncers.Mesh("bounceRbc", kbt=0.0)