Few beginners questions on PFV

Asked by mrhappy on 2020-03-28

Hi Guys,

I have really enjoy using YADE and I want to start involving fluid flow. I have read [1] and I have a few questions:
1. According to [1] YADE makes triangles (3D pyramids) between spheres and surrounding walls. How can I find out the pore numbers and there exact x,y,z location. Here pores would be the center point of a triangle.
2. I am applying pressure at a specific x,y,z location using flow.imposePressure(Vector3(1,0.83,0),30000000). Would this be correct?
3. I often get the following error:
Error: CHOLMOD error: argument missing. file: ../Cholesky/cholmod_factorize.c line: 121
Segmentation fault (core dumped)
In general, what does this error mean? Should I be installing something to make my model work or is this error associated with but in my YADE model?
4. I have the following code. I am applying a pressure of 30000000Pa at the point (1,0.83,0). There are 4 spheres and the pressure is being applied at an empty space in-between the sphere. When the code runs, none of the spheres move. This is extremely confusing. I mean, the pressure is a lot. I noticed that there is a force that is applied on the spheres due to the pressure (through the inspect button), but I don’t see any movement. Am I doing something wrong? Please help.

Thank you sooo much for your time. I really appreciate it.

[1]Catalano E. A pore–scale coupled hydromechanical model for biphasic granular media. Application to granular sediment hydrodynamics[D]. PhD thesis, Université de Grenoble, 2012.

intR=0.1 # allows near neighbour interaction (can be adjusted for every packing)
DENS=2500 # Density


mn,mx=Vector3(0,0,-0.5),Vector3(5,9,0.5) # corners of the initial packing

  sphere(center=( 0.5, 0.5, 0.0),radius=0.5,material='mat1'),
  sphere(center=(1.5, 0.5, 0.0),radius=0.5,material='mat1'),
 sphere(center=(1,1.4, 0.0),radius=0.5,material='mat1'),
 sphere(center=( 2, 1.4, 0.0),radius=0.5,material='mat1'),

      GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.5, defaultDt=utils.PWaveTimeStep()),

def history():

#flow.bndCondIsPressure=[1,1,0,0,0,0] #only accepts 1 or 0 values
#flow.boundaryUseMaxMin=[1,1,1,1,1,1] #only accepts 1 or 0 values

from yade import plot

Question information

English Edit question
Yade Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Robert Caulk (rcaulk) said : #1

Have you noticed [1] yet? It is probably worth reading through so you can see what you have python access to inflowengine like [2][3].

>CHOLMOD error: argument missing. file: ../Cholesky/cholmod_factorize.c line: 121
Segmentation fault (core dumped)

Probably a stability issue. You could try reducing time step.

>When the code runs, none of the spheres move. This is extremely confusing.

Well you are using cohesive interactions, have you checked if they are broken?


mrhappy (mrhappy) said : #2

Hey Robert,

Thank you so much for your reply. I really appreciate it. I have gone over [1] several times, but I don't know how to read this. For example [2],

getCell((FlowEngineT)arg1, (float)arg2, (float)arg3, (float)pos) → int
    get id of the cell containing (X,Y,Z).

I know that getCell() is function that requires 4 things and gives out one integer. However, what is (FlowEngineT)arg1, (float)arg2, (float)arg3, and (float)pos? Can you explain what the things in the brackets mean, in general? I know that they are variables that are required by the function, but what exactly do they mean. Maybe you can direct me to some reading material, that explains this thing.

With regards to the spheres not moving, whether the bonds are broken or not should not matter. The spheres should move due to the pressure. I will investigate this deeper once I have access to all the python functions of the flow engine.

Thank you, Robert, for your help. I truly appreciate it.

[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.getCell

Jérôme Duriez (jduriez) said : #3

Generally speaking "(type) arg" is to read as describing the Python type (= "type") of the expected argument "arg" to the function.

Here, it's a little more complicated with all these systematic "(FlowEngineT)arg1". I can not explain you where they come from, but you can forget about them when calling these functions, and just be sure entering the other arguments.

The rest of the function signature then tells you should call getCell with 3 float attributes that - I guess - correspond to the (X,Y,Z) of the doc of the function, id est the point you're wondering which cells it belongs to !

In terms of fluid-induced movements, and if you're referring to a visual impression from YADE GUI, it's probably not a good idea to expect to "see" things, generally speaking. Better measure them numerically to check whether they're zero or not.

Would you visually see sand grains moving when doing a triaxial test in the lab ? ;-)

Robert Caulk (rcaulk) said : #4

> getCell((FlowEngineT)arg1, (float)arg2, (float)arg3, (float)pos)
>However, what is (FlowEngineT)arg1, (float)arg2, (float)arg3, and (float)pos?

Those are the arguments for the function. The type of each argument is in parentheses. Since this is a function and not a variable, the python wrapping needs to pass the FlowEngine as the first argument - this is done automagically for you. You can focus on the next three arguments. One float for each coordinate X, Y, Z.


>The spheres should move due to the pressure.

What proof do you have that they are indeed not moving?

mrhappy (mrhappy) said : #5

Thank you, both, for your help. Let me look into this and get back to you.

mrhappy (mrhappy) said : #6

I found out what’s wrong. I have the wrong order within the o.engines. The NewtonIntegrator should be at the end.
Now the spheres are moving.

I am very happy now.
Again, thank you guys for your help.