Navier Stokes <--> PorousFlow Heat Transfer in MultiApp #27710
Replies: 3 comments 4 replies
-
The functor units should match the units of |
Beta Was this translation helpful? Give feedback.
-
Are you missing a time derivative in the mass equation? The mixture is weakly compressible Nearest node for the heat flux is definitely not conservative. You ll have to get the renormalisaton postprocessors set up in both the parent and child app. They compute the integrated flux, then the fields are re-normalized to make the two PPs match |
Beta Was this translation helpful? Give feedback.
-
Check these boxes if you have followed the posting rules.
Question
You can see some previous discussion in #27159
I am trying to couple a multiphase navier stokes simulation subApp to a PorousFlow Main app.
The NS app is modeling magma flow in a narrow channel it is largely based on the Gallium solidification example but it has a non-linear melt fraction temperature relationship. It is the smaller domain and makes up the left boundary of the porous flow app. It is intended to model a magmatic dike.
The PorousFlow app uses the simple fluid and solves for heat conduction and advection on a large domain on one side of the dike. I added a loglinear permeability temperature relationship.
They are coupled in a multiapp with sub cycling and picard iteration so that the NS app can have smaller timesteps. It's a simple grid of two rectangles each with different resolutions which touch on the
right
andinterface
boundaries. The meshes are created seperately in each input file and uses thepositions
flag in the MultiApp set up. Right now it converges and yields a result but I don't think it physically looks right.Currently, here's how the coupling is set up:
VariableGradientComponent
and transfered to the sub appMultiAppGeneralFieldNearestNodeTransfer
whereFVFunctorNeumannBC
MultiAppGeneralFieldShapeEvaluationTransfer
and set to theinterface
boundary usingMatchedValueBC
Reading in some discussion and my own intuition says that this isn't the best way to do it. @GiudGiud adviced against it in #26189. I know that the heat flow across the BC is not conserved in the current model.
My goal is to figure out a transfer that allows spatial variability of heat transfer (mainly in the Y direction) along the length of the dike. We would expect based on our understanding of multiphase flow in the dike and hydrothermal circulation around the dike for there to be "hotspots" and "cold spots" which will lead to non-homogenous flow.
For this reason I didn't use
SideLayeredAverage
or various similar ones but I think I could useLineValueSampler
.Some points I was confused about:
what are the correct dimensions for$k\nabla T * dt$ which a rough approximation of the integral over t. Both
FVFunctorNeumannBC
?in 2d-rc-transient.i test I noticed the value for the functor is
u_inlet * rho * cp * T_inlet
which has dimensions of $L*\frac{M}{L^3}\frac{L^2M}{T^2*\theta}*\theta = \frac{M^2}{L^2}$Because of this I set the value to
k
andgradTx
come from the parent app. For testingk
is constant and isotropic and since we are dealing with a simple grid I just transfer one component fromgradT
(gradTx
>>gradTy
). Either way, the way I set it up is definitely suspect.FVFunctorNeumannBC
should have + values for heat flux IN and - values for heat flux out correct? It should be similar to the FENeumannBC
whereProbably related to (1) but I tried setting up a postprocessor to conserve heat flux between apps but I couldn't get it to run at all.
I did write a custom aux kernal that calculates the heat flow in the porousflow app which I could use to transfer but considering that I added the permeability temperature relationship, permability goes very low around the dike (10e-20) so it is mostly heat conduction anyway. I can add this in in the future or now if it would help but the units and conservation thing were a concern.
You can find it here
This is mostly a demo for the thesis which is due next week (it's last minute :( but I'm so close to getting it correct ) so it's okay if it's not perfect I'd really just like to include it for a cool example.
Here's the repo: https://github.com/aikubo/DOGS/tree/multiapp/sims/multiapp
And here's the Parent input file:
Here's the sub app:
Additional information
Mesh size and type: simple rectangular mesh with ~800 dofs in main and ~2100 in sub (small domain for testing)
Reynolds number: ~100
Discretization (finite element CG/DG, finite volume, etc): FV + FE
Models (turbulence, porous media, etc): mixture models + mushy friction
Solver method (fully coupled, segregated, multiapps, etc): multi app
Base input you started from: gallium_melting.i
Beta Was this translation helpful? Give feedback.
All reactions