I currently have a multiscale simulation using the Micro-Manager: I have a macroscopic mesh and whenever I need a microscale value in a single cell, the micro manager calls a micro simulation within this cell, calculates the data I need and passes it to the maco mesh. In our project, I have gotten new data, which due to the structure of the mesh, spans multiple macroscopic cells. Do you know if there is any way to have the micromanager perform a volume coupling over several macroscopic cells?
Currently, the Micro Manager cannot do volume coupling over several macro-scale coordinates at once. The Micro Manager has no mesh of its own. It accesses the macro-scale mesh and directly reads and writes data on its vertices. Can you please describe the case that leads you to want the Micro Manager to be able to do volume coupling over several macro-scale vertices?
thank you for your reply. My case is basically a multiscale simulation of fluid flow through porous media. Typically, I have the geometry of a representative volume element, which I use to calculate permeabilities on the micro scale and pass them to the macro scale to use in the macro domain with the micro manager. The issue with the new case is that my macro scale geometry is a bit complex, therefore the macro-mesh has to be relatively fine in certain areas and is approximately on the scale of the micro resolution and the underlying micro-geometry can no longer be seen as a representative volume. This leads to my issue with having to represent the flow of several macro cells with micro scale flow, but this might be a very niche issue.
I think for the case I am currently working on the volume coupling of the OpenFOAM-Adapter might be more beneficial. Would you agree?
If I understand correctly, you do one micro-scale simulation that computes the permeability, and use that as a parameter in the macro-scale simulation. This permeability changes over time, but is uniform in the complete domain, correct?
I could imagine a workaround where you define one point for the micro-simulation to write the Permeability data on, and a volume coupling with nearest-neighbor mapping in the OpenFOAM side, that would assign to all cells the same permeability. Given that your (modified) OpenFOAM adapter already reads this permeability, which seems like a problem you have already handled.
thanks for your answer. Not exactly: the permeability is constant over time, but nonuniform over the domain. So I have a macroscale mesh and for each cell I can define a microscale geometry, which is representative of the geometry in the entire macro cell. Calculating the permeability on the microscale and using this as a parameter on the macro domain was how I used to run my simulations, when the macro scale mesh was coarser everywhere and I could define such a representative volume. However, in some areas of my macroscopic mesh, where I can not define a representative microscale geometry, I am thinking of running a volume coupled simulation. Here I wouldn’t calculate the permeability, but rather the velocity, pressure and alpha fields explicitly, which I would add to the macroscale simulation. Do you think this is feasible?
Both pressure and alpha readings could be implemented. However, OpenFOAM will redefine these, so I cannot guarantee that this is feasible without some hacking around OpenFOAM. In the student project that implemented volume coupling in the OpenFOAM adapter, we used source terms for the velocity to enforce it. I am not sure if the same modeling approach can be used for pressure and volume fraction. What do you think, based on your experience? Have you tried something related already? How were you reading the permeability?
If there is no scale separation, using the Micro Manager is not justifiable as it will be an overengineered solution to a scenario that is essentially not multiscale.
This should be feasible by using three coupling participants. One macro-scale participant, one participant that resolves the micro-scale physics on a finer mesh and is volumetrically coupled to the macro-scale participant, and the Micro Manager, which manages micro-scale simulations relevant to the coarse domain on the macro scale.
@dennis Moving forward, it would probably still be good (at least for me )to have a sketch of your situation. Meshes etc?
What is still unclear to me: Do you know the locations where you want micro problems a-priori? Then, a solution could be to let the Micro Manager read in a mesh and map via preCICE between the finer macro mesh and the coarser Micro Manager mesh.
Yes, the positions of the micro-problem are known a priori. Below is an illustration of the meshes, the micro scale geometry is simply a higher resolution cutout of the macroscale geometry for simulations of flow through porous media. In the coarser macro scale geometry, the porous media is smeared out and I basically perform simulations of Darcy’s flow, while on the finer mesh, I can resolve geometric features and therefore can resolve Stokes flow.
Normally, a cell of the macro scale mesh would be much larger than the representative micro scale geometry and I would take the micro scale geometry, calculate the permeability and pass it to the macro mesh, which works very well and is super convenient with the Micro-Manager. In the current case I have, my (what I consider) macro scale geometry and micro scale geometry unfortunately have a similar scale, in the sense that the micro scale geometry spans several macroscopic cells. @IshaanDesai is absolutely right here to say, that I don’t have a clear scale separation anymore. You are right, letting the micro manager read in a mesh and map it via precice would be the correct way to tackle this, I will test this out I found a case from way in the beginning when I started using preCICE, where I used surface coupling for a similar problem, which will probably work as well Thanks for all of your input