← Back to team overview

yade-users team mailing list archive

Re: [Question #692924]: How can I measure a flux?

 

Question #692924 on Yade changed:
https://answers.launchpad.net/yade/+question/692924

    Status: Answered => Open

Guilherme das Neves Seguro is still having a problem:
Hello again, mr Caulk.

First of all thanks for answering my questions.

> Following your previous suggestions from answer #1, I've tried the
following:

totalVolume = 0
velocityVector = [0.0, 0.0, 0.0]
v = np.array([0,0,0])
cellVol = 0.0

for i in range(0,flow.nCells()):
  coords = flow.getCellCenter(i)
  velocityVector = flow.getCellVelocity(coords[0],coords[1],coords[2])
  velMag = np.linalg.norm(velocityVector)
  cellVol = flow.getCellVolume(coords[0],coords[1],coords[2])
  v = v + cellVol*velocityVector
  totalVolume += cellVol

And the output error message on the terminal is:

File "/home/guilherme/yade/install/bin/yade-2019-02-13.git-2b0d17e", line 288, in runScript
    execfile(script,globals())
  File "hydraulicInjection_plane2.py", line 350, in <module>
    velocityVector = np.array(flow.getCellVelocity(coords[0],coords[1],coords[2]))
AttributeError: 'DFNFlowEngine' object has no attribute 'getCellVelocity'

Thanks in advance!

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