[Yade-users] [Question #702425]: 2PFV - Cell Velocity

2022-07-08 Thread Luis Barbosa
New question #702425 on Yade:
https://answers.launchpad.net/yade/+question/702425

Hi guys,

I am using 2PFV, but have trouble to getCellVelocity.

Triangulation does not exist. Sorry.
Traceback (most recent call last):
  File "/usr/bin/yade", line 343, in runScript
execfile(script,globals())
  File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 87, in 
execfile
exec_(code, myglobals, mylocals)
  File "matrix_drain_scaled21_Calibrado2.py", line 344, in 
celsVel1=unsat.getCellVelocity(ii)
Boost.Python.ArgumentError: Python argument types in
TwoPhaseFlowEngineT.getCellVelocity(TwoPhaseFlowEngine, int)
did not match C++ signature:

getCellVelocity(yade::TemplateFlowEngine_TwoPhaseFlowEngineT >, 
yade::CGT::FlowBoundingSphereLinSolv >, 
yade::CGT::FlowBoundingSphere > > > > {lvalue}, Eigen::Matrix 
pos)




I modified the example - 
https://gitlab.com/yade-dev/trunk/-/blob/master/examples/FluidCouplingPFV/oedometer.py


###
## Drainage Test under oedometer conditions ###
###
##Instantiate a two-phase engine
unsat=TwoPhaseFlowEngine()
#meanDiameter=(O.bodies[-1].shape.radius + O.bodies[6].shape.radius) / 2.

##set boundary conditions, the drainage is controlled by decreasing W-phase 
pressure and keeping NW-phase pressure constant
unsat.bndCondIsPressure=[0,0,1,1,0,0]
unsat.bndCondIsWaterReservoir=[0,0,1,0,0,0]
unsat.bndCondValue=[0,0,-1e8,0,0,0]
unsat.isPhaseTrapped=True #the W-phase can be disconnected from its reservoir
unsat.initialization()
unsat.surfaceTension = 0.0728
unsat.updateTriangulation=True
unsat.meshUpdateInterval=200
unsat.defTolerance=0.3

#unsat.breakControlledRemesh=True


#start invasion, the data of normalized pc-sw-strain will be written into 
pcSwStrain.txt

f1=open('MatrixCellsa4'+str(YM)+'_'+str(BS)+'.txt',"w")

ts=O.dt
pgstep= 40 #4500*ts #30Pa/s
print (pgstep)
pgmax= 1#9316 #Pa
mi=0.00089 #Pa.s

for pg in arange(1.0e-8,pgmax,pgstep):
  unsat.bndCondValue=[0,0,(-1.0)*pg,0,0,0]
  unsat.invasion()
  unsat.computeCapillaryForce()
  unsat.permeabilityMap=True

  q=unsat.averageVelocity()
  L=0.0016*(1+triax.strain[1]+ei1)
  P=abs((mi*q*L)/pg)
  
print(unsat.getSaturation(isSideBoundaryIncluded=False),pg,-triax.strain[1],P,triax.porosity)

  for b in O.bodies:
O.forces.setPermF(b.id, unsat.fluidForce(b.id))

  if pg==520.0001:
cels=unsat.nCells()
celsW1 = [0.0]*cels
celsV1 = [0.0]*cels
celsBar1 = [0.0]*cels
celsPore1 = [0.0]*cels
celsVel1 = [0.0]*cels
celsSA1 = [0.0]*cels
for ii in range(cels):
  celsW1=unsat.getCellIsWRes(ii)
  celsV1=unsat.getCellVolume(ii)
  celsBar1=unsat.getCellCenter(ii)
  celsPore1=unsat.getPoreThroatRadiusList(ii)
  celsVel1=unsat.getCellVelocity(ii)
  celsSA1=unsat.getSolidSurfaceAreaPerParticle(ii)
  f1.write(str(celsW1)+" "+str(celsV1)+" "+str(celsBar1)+" 
"+str(celsPore1)+" "+str(celsVel1)+" "+str(celsSA1)+"\n")
f1.close()

-- 
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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702411]: Calculation of a time averaging of a physical quantity

2022-07-08 Thread evagb54
Question #702411 on Yade changed:
https://answers.launchpad.net/yade/+question/702411

evagb54 posted a new comment:
Sorry Bruno if it was not clear.
 Using your answer, I wrote the program like this: 

while O.iter0 and b.state.pos[0]<0) or (b.state.pos[1]<0 
and b.state.pos[0]<0):
teta=pi-teta
   
if (b.state.pos[1]<0 and b.state.pos[0]>0):
teta=2*pi+teta
   
if (rayonrcylint) and (teta>teta0 and 

Re: [Yade-users] [Question #702411]: Calculation of a time averaging of a physical quantity

2022-07-08 Thread Chareyre
Question #702411 on Yade changed:
https://answers.launchpad.net/yade/+question/702411

Chareyre posted a new comment:
I don't understand last question, sorry.

-- 
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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702411]: Calculation of a time averaging of a physical quantity

2022-07-08 Thread evagb54
Question #702411 on Yade changed:
https://answers.launchpad.net/yade/+question/702411

evagb54 posted a new comment:
Thanks Bruno, I tried it and it works.
But I have a stupid question
How do we know that it is the time of the simulation that is considered ? 

Thanks for your insight.

-- 
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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702411]: Calculation of a time averaging of a physical quantity

2022-07-08 Thread evagb54
Question #702411 on Yade changed:
https://answers.launchpad.net/yade/+question/702411

Status: Answered => Solved

evagb54 confirmed that the question is solved:
Thanks Bruno Chareyre, that solved my question.

-- 
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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #702418]: About flow.bndCondIsPressure and flow.bndCondValue in flowengine

2022-07-08 Thread Bruno Chareyre
Question #702418 on Yade changed:
https://answers.launchpad.net/yade/+question/702418

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Hi,

1- Is "osmotic pressure" just the fluid pressure? ("osmotic" is strange in this 
context).
2- your problem statement is self-contradictory: if there is only one permeable 
boundary [0,0,0,0,0,1] is the correct setting, yes, but  how would you estimate 
permeability from "the other end" (which is no-flux) in such case?

-- 
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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #702421]: particle/particle Conductive heat transfer in thermal engine

2022-07-08 Thread Rioual
New question #702421 on Yade:
https://answers.launchpad.net/yade/+question/702421

Hello,

I am checking the implementation of particle/particle conductive heat transfer  
in thermal engine as presented in (1).
I do not understand the origin of the formula (9) in the framework:

Phi_ij = 2rcĀ²(ki+kj)/d (Tj - Ti)  (9)   [ rc: contact radius ; k: thermal 
conductivity ; d:distance between particles less overlap ]

with the reference of Norouzi et al (2) precised in the article.

Norouzi (2) introduces (p.309) two different expressions for
 
* collisional contact conductive heat transfer
complex expression involving square root of contact time and square of contact 
radius

 and 

* static contact conductive heat transfer (p. 310)

Phi_ij = 4rc(1/ki+1/kj) (Tj - Ti)

which corresponds to the classical expression used elsewhere to describe 
particle conductive heat transfer
as in ligghts 
(https://www.cfdem.com/media/DEM/docu/fix_heat_gran_conduction.html).


Could you give me more infos about the approach considered in thermal engine 
(formula 9) 


Thanks for all,

Best,

F.


(1)
https://www.researchgate.net/publication/335272631_An_open_framework_for_the_simulation_of_coupled_Thermo-Hydro-Mechanical_processes_in_Discrete_Element_Systems

(2) Norouzi, H. R., Zarghami, R., Sotudeh-Gharebagh, R., and Mostou, N. 
(2016). Coupled CFD-DEM Modeling. Wiley.



-- 
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@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp