← Back to team overview

yade-users team mailing list archive

[Question #702425]: 2PFV - Cell Velocity

 

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 <module>
    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::TwoPhaseCellInfo, yade::TwoPhaseVertexInfo, yade::CGT::_Tesselation<yade::CGT::TriangulationTypes<yade::TwoPhaseVertexInfo, yade::TwoPhaseCellInfo> >, yade::CGT::FlowBoundingSphereLinSolv<yade::CGT::_Tesselation<yade::CGT::TriangulationTypes<yade::TwoPhaseVertexInfo, yade::TwoPhaseCellInfo> >, yade::CGT::FlowBoundingSphere<yade::CGT::_Tesselation<yade::CGT::TriangulationTypes<yade::TwoPhaseVertexInfo, yade::TwoPhaseCellInfo> > > > > {lvalue}, Eigen::Matrix<double, 3, 1, 0, 3, 1> 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 #45000000*ts #30Pa/s
print (pgstep)
pgmax= 10000#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.00000001:
    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.