capillary + cohesive interactions

Asked by Mehdi Pouragha

Hello all,

I was wondering; Is there a way to have "cohesive+frictional" interaction at some contacts and "capillary+frictional" interactions at other contacts?

In other words, is there a clever way for using both "Ip2_FrictMat_FrictMat_CapillaryPhys()" and "Ip2_CohFrictMat_CohFrictMat_CohFrictPhys" during an iteration?

Or the only way is to develop a new Ip2 to handle this situation?

Thanks,
Mehdi

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Mehdi Pouragha
Solved:
Last query:
Last reply:
Revision history for this message
Karol Brzezinski (kbrzezinski) said :
#1

Hi,

maybe you could use only Ip2_CohFrictMat_CohFrictMat_CohFrictPhys() and use MatchMaker [1] to set zero cohesion for some materials.

Cheers,
Karol

[1] https://yade-dem.org/doc/yade.wrapper.html?highlight=matchmaker#yade.wrapper.MatchMaker

Revision history for this message
Jérôme Duriez (jduriez) said :
#2

Hi Mehdi,

Does the following script look like what you would like to do ?

##########
O.materials.append(FrictMat(label='frict'))
O.materials.append(CohFrictMat(label='cohfrict'))

for x in [0,1.9]: O.bodies.append(sphere((x,0,0),1,fixed=True,material='frict'))
for x in [0,1.9]: O.bodies.append(sphere((x,3,0),1,fixed=True,material='cohfrict'))

O.engines = [ForceResetter()
             ,InsertionSortCollider([Bo1_Sphere_Aabb()])
             ,InteractionLoop([Ig2_Sphere_Sphere_ScGeom()],
                              [Ip2_FrictMat_FrictMat_CapillaryPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys()],
                              [Law2_ScGeom_FrictPhys_CundallStrack()])
             ,Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure = 10)
             ,NewtonIntegrator()
             ]

O.step()
########

I did not test thoroughly but 0-1 bottom row interaction should be capillary+frictional and 2-3 top row should be cohesive-frictional

Let us know

Revision history for this message
Mehdi Pouragha (mpouragha) said :
#3

Thank you, Karol and Jerome!

Karol: Your solution inspired me to solve another unrelated issue I was dealing with. Thanks.

Jerome: Your suggestion worked like a charm. Thanks! I did not know we could include two IP2s at the same time.

I changed your script slightly so that the rows are also in contact "sphere((x,0,0),...." and "(sphere((x,1.9,0) ...." This way we also have cohesive/frictional interaction which is interpreted by YADE as frictional with capillary force and this is exactly what I needed.

Depending on the order of the materials and the particle size, sometimes I get the following error
 <ERROR> Engine:83 virtual void yade::Law2_ScGeom_CapillaryPhys_Capillarity::action(): The capillary law is not implemented for interactions using CohFrictPhys

But the simulation seems to be running. Should I worry about this error?

Below is a script that generates the error:

#####
dens = 2200
Ey = 1e7
pois = 1
angle = radians(0.5)
radius = 5e-4

O.materials.append(FrictMat(density=dens, young=Ey, poisson=pois, frictionAngle=angle,label='frict'))
O.materials.append(CohFrictMat(young=Ey, poisson=1, frictionAngle=angle, density=2.6, alphaKr=5.0,
    alphaKtw=0.0, normalCohesion=1.5e2, shearCohesion=8.4e2,label='cohfrict'))

O.bodies.append([
 sphere(center=(0, 0, 0),radius=radius, fixed=True, material='cohfrict'),
 sphere(center=(0, 1.9*radius, 0), radius=radius, fixed=True, material='cohfrict'),
  sphere(center=(1.9*radius, 0, 0), radius=radius, fixed=True, material='frict'),
  sphere(center=(1.9*radius, 1.9*radius, 0), radius=radius, fixed=True, material='frict')
])

O.engines = [
 ForceResetter(),
 InsertionSortCollider([Bo1_Sphere_Aabb()]),
 InteractionLoop(
  [Ig2_Sphere_Sphere_ScGeom6D(interactionDetectionFactor = 1.5)],
  [Ip2_FrictMat_FrictMat_CapillaryPhys(),Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow = True, setCohesionOnNewContacts = True)],
  [Law2_ScGeom6D_CohFrictPhys_CohesionMoment(), Law2_ScGeom_FrictPhys_CundallStrack()]
 ),
 Law2_ScGeom_CapillaryPhys_Capillarity(capillaryPressure=500),
 GlobalStiffnessTimeStepper(),
 NewtonIntegrator()
]

O.step()
######

Curiously, if we define the first 2 balls (0,1) to be 'frict' and (2,3) to be 'cohfrict', then the error disappears.

Thanks,
Mehdi

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

Regarding my previous post, I realized I forgot including the cohesive Law2 (and its ScGeom6D requirement) but you corrected it.

Regarding your new error, it makes me reconsider things in more detail and it appears you're indeed outside the design zone of capillary Law2. The latter may assume by design all interactions have the same .phys type [*]. Type is checked on the first real interaction only. Depending on arbitrary things ruling interactions storage order, it may be a CohFrictPhys one, or not, in your case. Which explains the variable appearance of the ERROR message.

But whether it appears or not, a question remains about how the capillary Law2 will handle these CohFrictPhys interactions. I may need to wait for summer vacations to have my mind clear about that (which is matter of casting objects with mother-child classes)... In the meantime I would advice you double check things on your side.

[*] https://gitlab.com/yade-dev/trunk/-/blob/master/pkg/dem/Law2_ScGeom_CapillaryPhys_Capillarity.cpp#L74 and group below

Revision history for this message
Mehdi Pouragha (mpouragha) said :
#5

Thank you Jerome!
I will try to perform some simple tests and see if it works.
Cheers,
Mehdi