yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10311
[Bug 1260213] Re: error in FlowEngine with imposed pressure and getCellFlux()
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
--
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1260213
Title:
error in FlowEngine with imposed pressure and getCellFlux()
Status in Yet Another Dynamic Engine:
Invalid
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1260213/+subscriptions
References