← Back to team overview

yade-users team mailing list archive

[Question #701519]: Import packing text file into yade

 

New question #701519 on Yade:
https://answers.launchpad.net/yade/+question/701519

Hello everyone;

Hope you are doing well.

I used yade.export.text('filename.txt', mask=-1) to extract the particle position and radii in #format x_y_z_r , now I want to import this text file to extract its pore data with ‘flow.savePoreNetwork()’.

I used yade.ymport.text for this purpose, but I faced with this error:

ValueError: could not convert string to float: '0.42264,0.478226,0.889397,0.115182'

(which are the values of first row)

Here is my code:

###

import os
import numpy as np
import pandas as pd
from yade import pack, ymport
from yade import utils, plot, timing
from yade import export
 
yade.ymport.text('final.txt', shift=Vector3(0, 0, 0), scale=1.0)

O.engines = [
  TwoPhaseFlowEngine(dead=0,label="flow"),
]

press=1000.    

flow.dead=0
flow.meshUpdateInterval=-1
flow.useSolver=3
flow.permeabilityFactor=1
flow.viscosity=0.1

flow.bndCondIsWaterReservoir=[0,0,1,0,0,0]

flow.bndCondIsPressure=[0,0,1,0,0,0]
flow.bndCondValue=[0,0,press,0,0,0]
flow.boundaryUseMaxMin=[0,0,0,0,0,0]
flow.iniVoidVolumes=True

flow.surfaceTension = 0.0
flow.drainageFirst=False
flow.isDrainageActivated=False
flow.isImbibitionActivated=True
flow.isCellLabelActivated=True
flow.initialization()
cs=flow.getClusters()
c0=cs[1]

#flow.getCellVoidVolume(4)
#flow.getCellInSphereRadius(100)
flow.savePoreNetwork() #extract info about the pore

###

I am grateful for any hints or insights into this issue.

Best regards,
Soheil

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.