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