yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #14543
Re: [Question #593653]: How to simulate a sinusoidal-shaped pressure condition at the top boundary of the packing
Question #593653 on Yade changed:
https://answers.launchpad.net/yade/+question/593653
Status: Open => Answered
Robert Caulk proposed the following answer:
Dear Deng,
I am going to try my best to answer your question, but maybe Bruno will
chime in with a correction if I am wrong.
I have looked at how waveAction was implemented, and it appears that the
user does not have control over which boundary waveAction is applied. It
seems the functionality may have been added with one application in
mind: applying sinusoidal pressure to the yMax boundary of the specimen.
Further, it looks like waveAction itself only varies pressure spatially,
not temporally as you want. Thus, I think you will need to vary
sineMagnitude and/or sineAverage with time on the python side (or you
can edit the source [1]). Maybe something like this (no warranty):
Set up scene
Set up flow with flow.waveAction = True
A = some amplitude
avg = some average
time = some time
t = 0
while t < time:
t = O.dt*O.iter
scale = np.sin(t/time)
flow.sineMagnitude = A*scale
flow.sineAverage = avg*scale
flow.updateTriangulation = True
O.run(some steps)
Another comment, the pressure boundary condition only changes when the
mesh is updated. So you will need to make sure to use
updateTriangulation (or meshUpdateInterval) as shown above to impose
your new pressures! Good luck.
Regarding Paraview showing the pressure at "yMin" instead of "yMax".
Hmm, I'm not terribly surprised here, I've run into Paraview visualizing
axes "incorrectly" in the past.
[1]
https://github.com/yade/trunk/blob/a3e2b37fea3859a210dd1bddcfed9ab6a5085105/lib/triangulation/FlowBoundingSphere.ipp#L388
--
You received this question notification because your team yade-users is
an answer contact for Yade.