I have another question on multiscale coupling between OpenFOAM and the Micro-Manager. I am trying to couple multiscale transport in porous media. For this I have two geometries: one macroscopic mesh and multiple mesoscopic models, each of which correspond to the porous geometry in a macroscopic cell.
In my macroscopic geometry I have regions, in which I know beforehand that homogenization of the flow is insufficient to calculate the volume fraction and velocity of the liquid, because the porous media is heterogeneous (this leads to very strong preferential pathways for the fluid). My idea would be to use the pressure along the faces of the macroscopic cells and use these as boundary conditions on the corresponding mesoscopic domain. From the mesoscopic simulation I extract the average fluid content and velocity and pass it back to the corresponding macroscopic cell.
I basically have a two-way coupled problem, where I pass down the pressure and return the volume fraction and velocity. My question is: if I implicitly volume couple these variables to each other, would this lead to a mass conservative macroscopic simulation or would the mass simply appear in the macroscopic simulation?
Also important to add: the mesoscale geometry is a replica of the macroscopic geometry, just more finely resolved. This means that I have perfect overlap between a macroscopic cell and the mesoscopic geometry within the macroscopic cell.
This is a modeling question that would also apply to any flow coupling of two-phase flows in overlapping domains. The Micro-Manager would mainly reduce the number of mesoscopic simulations to run, and I assume that the similarity metrics would play a role in the mass conservation.
Other than that, when mapping the volume fraction between different meshes, one should check that this conserves mass. I have not tried this, but I think the scaled-consistent mapping is what you would need for the volume fraction:
Thanks for your reply! Just be sure that we mean the same thing: in my context, the macroscale and mesoscale both refer to the same liquid. By mass conservation, I mean that the pressure should be adjusted so that the mass is consistent between the macroscopic volume fraction (in a single finite-volume cell) and mesoscopic (in the finely resolved geometry of the macroscopic cell) volume fraction. In other words, the pressure update should ensure that the mass calculated in the small-scale domain—based on macroscopic boundary conditions—is effectively “drawn” from the bulk liquid in the macroscale domain. Is this the intended behavior during the implicit coupling process?
This is not how current application of the micro manager work. Typically we have periodic boundary conditions in the micro problems. But interesting and I don’t see any technical issue.
I don’t think that one can give a general answer to this question. This will depend on how exactly you do things and I guess it will depend also on the discretization of the macro domain, on how exactly you set the velocity on the macro domain, etc.
However, I don’t think that this has anything to do with explicit vs. implicit coupling and neither with mapping (The MM doesn’t use any mapping).
Yes, this works without an issue for me. I only have to write out the variables at the faces on the macroscale and pass these to the mesoscale.
So you think this would be more of a question on the side of my solver (ie whether I am using finite volumes or finite elements) and not preCICE specific?
@dennis i am working on biomechanics with fem, which is also based on homogenization approach in that sense but no fluid-fluid coupling:D What brought my attention is the question about the mass conservation in a macro-micro coupling context, which is really interesting, but i am also not sure:D