error in FlowEngine with imposed pressure and getCellFlux()

Bug #1260213 reported by Christian Jakob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yade
Invalid
Undecided
Unassigned

Bug Description

Hi,

I want to increase pore pressure in a PFV cell in the middle of my model containing loose granular material (sand).
So I did:
#################

porePressure = 5000000

middleCell = flow.getCell(Vector3(xDim/2,yDim/2,zDim/2)) # [1]

print 'increased pore pressure at ',Vector3(xDim/2,yDim/2,zDim/2), ' to ',porePressure

flow.imposePressure(Vector3(xDim/2,yDim/2,zDim/2),porePressure) # [2]

#I want to see which velocity corresponds to this porePressure:

vel_fluid = flow.getCellFlux(middleCell) # [3]

#################

This error messages occured:

Triangulation does not exist. Waht did you do?!
increased pore pressure at Vector3(0,001,0,001,0,0015) to 5000000
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "scripts/definitions-final.py", line 78, in writeData
    vel_fluid = flow.getCellFlux(middleCell)
OverflowError: can't convert negative value to unsigned

[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.getCell
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.imposePressure
[3] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.FlowEngine.getCellFlux

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

Sorry, I found the bug in my script. Set O.run(1,1) before getCell() solves these two error messages.

But another error occurs:

ERROR /home/christian/YADE/trunk/pkg/dem/FlowEngine.cpp:189 getCellFlux: Getting flux with cond higher than imposedP size.

Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

Not a bug, although the documentation could be more explicit.

Docstring:
    imposePressure( (FlowEngine)arg1, (Vector3)pos, (float)p) -> int :
        Impose pressure in cell of location 'pos'. The index of the condition is returned

Docstring:
    getCellFlux( (FlowEngine)arg1, (int)cond) -> float :
        Get influx in cell associated to an imposed P (indexed using 'cond').

imposePressure() returns an index, this index can be used to get the associated flux.
It doesn't matter if the element containing the middle point is element 127 or 1333 (the values you get with getCell()).
The first point where pressure is imposed will get index 0, the next one will be 1, etc. In other words, the getCell function is useless in your case.

There is a good reason for that.The mesh is changing with time (as soon as deformation occures), so that the index of the element containing the middle point is changing all the time. It is something you don't have to worry about if each imposed pressure is assigned a static index.

A correct sequence is like this:

middleCellCond = flow.imposePressure(Vector3(xDim/2,yDim/2,zDim/2),porePressure)
O.run(1,1)
influx = flow.getCellFlux(middleCellCond)

Changed in yade:
status: New → Invalid
Revision history for this message
Bruno Chareyre (bruno-chareyre) wrote :

And, as mentionned yesterday. It is not a velocity, it is a flux.

Revision history for this message
Christian Jakob (jakob-ifgt) wrote :

Thanks a lot!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.