← Back to team overview

yade-dev team mailing list archive

Re: updating PFV

 

first of all:

thank you very very much for your time spending on answering my question(s)!


Zitat von Bruno Chareyre <bruno.chareyre@xxxxxxxxxxx>:

On 20/02/14 10:52, Christian Jakob wrote:
Hi,

I want to do some updates/improvements of PFV method.

Don't do anything yet!

oops, too late :(

There is some code cleaning going on locally
(different variable names, removing useless functions, and so on). It
will mess up everything when I will commit if you have local diffs. Make
you a favor and wait one more week, or be ready for tedious merge.



First thing I wanna do is a simulation with an increasing pore
pressure in all cells to investigate liquefaction of a loose sand at
different stress conditions. I tested imposePressure(), but for now it
is not possible to use it within a loop over PFV cells. Actually it
needs position of the cells (or at least a point within the cell), but
I want it to do something like:

for i in range(flow.ncells()):
  flow.imposePressure(i,p)

This loop is strange. Do I miss something?

of course you missed at least one if condition ... sorry i should have been more clear on this point ...

1/ If you impose pressure everywhere, there is no point using a fluid
solver (which aim is to compute pressure, at the end of the day)
2/ If pressure is the same everywhere, it applies no force on particles
(forces only come whith pressure gradients), again no point to simulate
a fluid.
3/ In liquefaction, pressure increase comes from the hydromechanical
coupling (and the model gives that) not from an externally applied pore
pressure

that is main question of my study: which processes leads to increased pore pressure? and how much excess pressure is needed to trigger liquefaction ? for this purpose i have to impose pressure at a larger part of the model. this is why i need a to loop over cells and use imposePressure heavily!

4/ The element number "i" is not something you can rely on, this is why
such function does not exist. The mesh is changing all the time as
particles move, thus element number "i" is meaningless. Applying
pressure at a specific location in space is more appropriate.

from my point of view it should be possible to do this via "i". I already implemented it (not tested yet). Also I am planning to do similar update to other methods, that use "pos" as input (imposeFlux, getPorePressure, ...)


Besides, I agree that there is a need for writing loops on all elements
in other cases. We (you, Thomas, me, ...) can add it after the code
cleaning step.

I will do it (see above) ...



I had a short look at the source code, it is quite confusing. I
searched code for imposePressure. It finds 6 lines in
pkg/dem/FlowEngine.hpp, but where is corresponding code in .cpp file?
I noticed there is a macro called TPL. How can edit the code of this
macro?

imposePressure is defined in the hpp [1].
The TPL macro as well [2].

[1] https://github.com/yade/trunk/blob/master/pkg/dem/FlowEngine.hpp#L330
[2] https://github.com/yade/trunk/blob/master/pkg/dem/FlowEngine.hpp#L24


yes, i noticed already ... sorry for this silly question, it was is not my day


The template aspect makes things a bit more difficult to read, but it is
the only way I found to not duplicate the whole PFV code each time there
is something new. Periodic BC, drainage model, solute transport, etc.
will normally be only different instances of FlowEngine with different
template parameters (and maybe additional functions). It is the case for
periodic BC already, which do not duplicate anything.

aah, i see

I'm open to suggestions if somebody has a better idea of design. The
root of the problem is the data type in each element/node, which is the
template parameter of CGAL::Triangulation and is different for each new
model.

Sorry, I am really not the guy to ask for C++ design stuff!
But I see the problem ...


Cheers.

Bruno


Again, thanks a lot!



_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp






References