← Back to team overview

yade-users team mailing list archive

Re: [Question #682194]: Error in Paraview & flow.saveVtk()

 

Question #682194 on Yade changed:
https://answers.launchpad.net/yade/+question/682194

    Status: Open => Answered

Chareyre proposed the following answer:
Hi,
Changing mask dynamically during execution is not an anticipated situation
and it makes the coupling problem extremely complex. It would need
substantial work to adress your issue.
Bruno

Le ven. 19 juil. 2019 18:09, Chu <question682194@xxxxxxxxxxxxxxxxxxxxx> a
écrit :

> New question #682194 on Yade:
> https://answers.launchpad.net/yade/+question/682194
>
> Hi,
>
> I'd like to test flow.mask[1] to assign bodies affected by FlowEngine.But
> when I open the Vtk saved by flow.saveVtk(),Paraview crashed.It is not
> always occur,but in my script it does.In the MWE,if I use psd1,Paraview
> crashed.And it not occur with psd2.
>
> Thanks for any suggestions.
>
> ###########MWE#############
>
> from yade import pack
>
> psdSizes,psdCumm=[0.0005,0.0006,0.005,0.007],[0,0.35,0.35,1.] #psd1
> #psdSizes,psdCumm=[0.0005,0.0006],[0,1.] #psd2
> num_spheres=1000# number of spheres
> young=1e9
> mn,mx=Vector3(0,0,0),Vector3(0.01,0.01,0.01) # corners of the initial
> packing
>
>
> O.materials.append(FrictMat(young=young,poisson=0.2,frictionAngle=radians(0),density=2600,label='spheres'))
>
> O.materials.append(FrictMat(young=1e11,poisson=0.2,frictionAngle=0,density=0,label='walls'))
> walls=aabbWalls([mn,mx],thickness=0,material='walls')
> wallIds=O.bodies.append(walls)
>
> sp=pack.SpherePack()
>
> sp.makeCloud(mn,mx,psdSizes=psdSizes,psdCumm=psdCumm,distributeMass=True,num=num_spheres,seed=1)
> sp.toSimulation(material='spheres')
>
> newton=NewtonIntegrator(damping=0.2,label="newton")
>
> O.engines=[
>         ForceResetter(),
>         InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
>         InteractionLoop(
>                 [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
>                 [Ip2_FrictMat_FrictMat_FrictPhys()],
>                 [Law2_ScGeom_FrictPhys_CundallStrack()],label="iloop"
>         ),
>         FlowEngine(label="flow"),
>
> GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=100,timestepSafetyCoefficient=0.8),
>     PyRunner(iterPeriod=2000,command='test_mask()',label='detach'),
>     PyRunner(iterPeriod=2000,command='flow.saveVtk()',label='savevtk'),
>         newton
> ]
>
> flow.dead=0
> flow.mask=1
> flow.defTolerance=0.3
> flow.meshUpdateInterval=200
> flow.useSolver=3
> flow.permeabilityFactor=1
> flow.viscosity=0.001
> flow.bndCondIsPressure=[1,1,0,0,0,0]
> flow.bndCondValue=[0,50,0,0,0,0]
> #flow.boundaryUseMaxMin=[0,0,0,0,0,0]
> flow.updateTriangulation=True
> O.dt=1e-8
> O.dynDt=False
>
> def test_mask():
>     for i in O.bodies:
>         if isinstance(i.shape,Sphere):
>             if i.state.pos[0] < 0.003:
>                 i.mask = 2
>
> #############################
>
> [1]
> https://yade-dev.gitlab.io/trunk/yade.wrapper.html?highlight=#yade.wrapper.FlowEngine.mask
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to     : yade-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>
>
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.