# Few beginners questions on PFV

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.

# MATERIAL PROPERTIES
intR=0.1 # allows near neighbour interaction (can be adjusted for every packing)
DENS=2500 # Density
YOUNG=1800
FRICT=7
ALPHA=0.1
TENS=100
COH=1000

mn,mx=Vector3(0,0,-0.5),Vector3(5,9,0.5) # corners of the initial packing
walls=aabbWalls([mn,mx],thickness=0,material='mat1')
wallIds=O.bodies.append(walls)

# PARTICLES
O.bodies.append([
])

# SIMULATION LOOP
O.engines=[
ForceResetter(),
InsertionSortCollider([Bo1_Sphere_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(interactionDetectionFactor=intR)],
[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],
[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM()]
),
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=10,timestepSafetyCoefficient=0.5, defaultDt=utils.PWaveTimeStep()),
NewtonIntegrator(damping=0.1),
PyRunner(iterPeriod=200,command='history()')
]

def history():

flow.defTolerance=0.3
flow.meshUpdateInterval=1
flow.useSolver=3
flow.permeabilityFactor=1
flow.viscosity=10
flow.updateTriangulation=True
#flow.bndCondIsPressure=[1,1,0,0,0,0] #only accepts 1 or 0 values
#flow.bndCondValue=[1000,1,0,0,0,0]
#flow.boundaryUseMaxMin=[1,1,1,1,1,1] #only accepts 1 or 0 values
flow.imposePressure(Vector3(1,0.83,0),30000000)

#PLOTTING
plot.plots={'t':('p')}
plot.plot()
# SAVE SIMULATION

## Question information

Language:
English Edit question
Status:
Solved
For:
Assignee:
No assignee Edit question
Solved by:
mrhappy
Solved:
2020-03-31
Last query:
2020-03-31
2020-03-30
 Robert Caulk (rcaulk) said on 2020-03-28: #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 on 2020-03-30: #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.

 Jérôme Duriez (jduriez) said on 2020-03-30: #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 on 2020-03-30: #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.

flow.getCell(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 on 2020-03-31: #5

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

 mrhappy (mrhappy) said on 2020-04-03: #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.