1 (edited by Carl 25-02-2010 10:36:45)

Topic: Multiscale and the MacroLSpace element

Hi!

I am currently working on coupled Darcy flow with an underlying Stokes Flow i.e multiscale modelling. What I need to do is to for every Gausspoint on the macro scale/domain (the Darcy flow) solve a micro problem (Stokes flow on a RVE) to produce the permeability matrix. I looked at the MacroLSpace element but as I understand, the MacroLSpace does not solve the underlying problem in every Gausspoint but rather as a domain that "fills" the MacroLSpace element. Is this correct?

In that case, is the way to go to create a material that solves the Stokes flow problem in a given file as in the MacroLSpace example? And how do I couple my Darcy flow with my Stokes flow (I want to be able to solve the Stokes flow with both prescribed boundary velocities and traction, ie Neumann and Dirichlet conditions)?

Another question concerning macro/micro problems, will the parallellization work automatically or do I have to implement support for it somehow?

Sincerily,
Carl

2

Re: Multiscale and the MacroLSpace element

Dear Carl,

it is true, that MacroLSpace elements has the RVE on itself, not in every integration point. What you want, is to have RVE in every integration point.
The solution would be to create a new material class (macro-material), containing related micro-problem representation. Any action on any macro-integration point will then be translated by the macro-material to its micro-problem, prescribing appropriate boundary conditions, evaluation of the response, followed by some homogenization. I see no problem for micro-problem to solve Stokes Flow while macro problem solving Darcy flow.
Some inspiration could be taken from macroLSpace element. However, there are some things, that could be done differently: each macroLSpace contains its own instance of micro-problem. This could be done much more better, as the RVE will be typically the same. In your case, the RVE could be shared for all gauss points of the same material (so it will be a property of macro-material, this does not mean that you could not have different RVEs, in this case, one will simply create more instances of macro-material, each with different underlying micro-problem). This more efficient design requires to store the history (and state) for the microproblem for each macro integration point. This is not difficult to implement, as each material comes with its material status, and its  unique instance is created for every integration point. In this case, the macro-material will define its status, that will contain an object storing the micro-problem history for corresponding macro integration point.  The history could be stored and restored using already available services (store&restore context) into the DataStream. DataStream could be a file, but also a memory buffer as well (this needs to be implemented, but not a big deal).
I would recommend to follow this, rather then the raw-force approach used in macroLSpace Element, as the duplication of micro-problem leads to very high memory demands,

The parallel computation should work, if the macro-material will be implemented correctly. But note, there is no parallel support for flow problems now, but it could be easily added - its basically just creating a suitable linear solver and making some changes in nonlinear solver (some communication to evaluate global norms correctly, etc), but most of the serial code is retained without change.

I could help with design of macro-material, as this will allow to recast the macoLSpace as well. One could create some parent class, problem independent, that will provide common support for such a kind of materials.

Borek

Re: Multiscale and the MacroLSpace element

Hi Borek!

I concur that it would be a good idea to create a parent class for macromaterial containing micro problem where the RVE will be stored only once. However, I am not sure how the boundary conditions would be transferred from the macro problem to the RVE. I mean, how do I tell the micro problem that the velocity is prescribed or the traction? In the example of macroLspace boundary conditions is imposed on the RVE in the file containing the microproblem.  Any help implementing a parent class would of course be greatly appreciated :-)

Concerning the parallelization.. I have implemented two classes for oofem so far. One for the Stokes flow and one for the Darcy flow. Both of them are derived directly from EngngModel. What needs to be done to prepare these models for parallellization? Are there any documentation on this topic?

/Carl

4

Re: Multiscale and the MacroLSpace element

Dear Carl,

I can imagine, that the boundary conditions of the micro-problem should be communicated with corresponding macro-element. The macro-material should be responsible for doing this by directly manipulating the micro problem (adding new boundary conditions, associating them to corresponding nodes, elements, etc.), before solving the micro response. This will require, that macro-elements will provide some methods to query applied BCs. You may also include all possible BCs in micro-problem and only switch them on/off based on actual applied BCs on macro level, but I consider this to be less general.

Concerning the parallelization, I don't have any documentation ready. Perhaps the simplest example is linear static implementation (linearstaic.C in sm module), The parallel sections are marked with  __PARALLEL_MODE directives. You may have a look on it. If you just want to get your linear system solved in parallel, the work required is even simpler, as only modification in solveYourselfAt() method are required. The additional stuff is needed to correctly compute reaction forces of supported nodes on  inter-partition boundaries. I will try to prepare some introductory material at oofem wiki, but need to save some time.

Borek

Re: Multiscale and the MacroLSpace element

i was looking for this issue for a long time but finally i got the solution from the post.. thank mate..

Re: Multiscale and the MacroLSpace element

Hi Borek!

I have been putting some thought into the RVE material. I have the following suggestion:

* First, a material, rvematerial, is created. It is a direct decendant to the Material class. rvematerial is the baseclass for all rve materials. rvematerial takes care of loading and instanciating the EngngModel object (rve) for some specified file. The decendants to rvematerial implements the giveCharacteristicmatrix function that sets boundary conditions on the EngngModel and then solves the rve and returns the characteristic matrix. The material in the .in file would look something like

rveStokesFlow 1 file "./rve_StokesFlow.in"

where rve_StokesFlow contains the complete problem except boundary conditions.

* Boundary condition are imposed by material driver on the engineering model and created during run-time. This is done by decendants to rvematerial to maintain scalability. For the material driver to be able to distinguish which nodes are located on some boundary, it is necessary to specify this in the .in file. Or maybe there is any other way to determine which edge of the domain an edge of an element or a node is located?

* Once the rve problem is solved, the result has to be averaged. In order to get this to work, the element class used has to be able to integrate the result (stress, strain, velocity, pressure etc.) over its area/volume. The rvematerial class then loops over each element in the rve and calculates the averaged value. The reason that the elements should be responsible for the integration of the result is that it would take too much work to implement all possible combinations of elements and shapefunctions into the rvematerial class. An idea is to create a class called 'rveElementCapabilities' that gives elements the capability to be used in homogenization. The elements can then inherit (in addition to whatever other class is inherited) decendants to rveElementCapabilities that contains the necessary functions, for example a function

            giveIntegratedQuantity(DofID id, double *Area, double MeanValue)

for the integrated quantity.

Since the engineering model is loaded at the material level, it is only loaded once as there is only one instance of each material.

So what do you think of this suggestion?

/Carl

7

Re: Multiscale and the MacroLSpace element

Dear Carl,

good! I have following comments:
1) For each dofmanager you can set (and read from input file) a boundaryFlag, indicating that it is located on the boundary. Perhaps this can help in imposing boundary conditions. We can also think about making this more general, so one can set boundary id instead of flag only.
2) I agree with you concerning the element integration support. The rveElementCapabilities class shuold be derived from Interface class (see its documentation). All classes derived from FEMComponent (so also elements) already have the built in capability to dynamically request specific interface (method giveInterface)
3) You wrote: Since the engineering model is loaded at the material level, it is only loaded once as there is only one instance of each material. Yes, the micro engineering problem data structure will be shared for all points of the same material, but the history is unique for all integration points and it needs to be stored/restored for each point (see my first reply in this topic, in case you are not aware).

Hope that it helps,
Borek