regionCouple in multiRegionFoam
this is regarding a combination of the regionCouple BC and the chtMultiRegionFoam solver.
I am working on a new solver for mhd-application starting from the chtMultiregionFoam with its fields setup like
Typically you have scalar values like T passing from one region to the other while there is a need of BC to treat the "passing" (e.g. solidWallMixedTemperatureCoupled) which are also working in my case for the electricPotential (see the other posts here in the forum).
But how is it about vectorial values (like the electric Field j)?
At the "internal" BC for this values i need to specify smth. but actually one just wants the neighbor values being recognized. A zeroGradient isnīt working for absolutely logical reasons because even if the simulation is running nicely and converging... the regions arenīt interacting over the internalBC... letīs say they donīt see each other they are just zeroGradient. So this is half the way wrong...the Gradient needs to know about the value on "the other side".
If i look at regionCouple: this is exactly what we need, the values are connected.
And hereīs the kicker: how can i initialize my fields like i do in chtMultiRegionFoam (one after another because of
Hope you can get my point.
Looking forward for some thoughts on that.
Tanks in advance,
The boundaries from chtMultiRegionFoam and the regionCouple boundaries both use harmonic interpolation at the boundary to preserve the flux at the boundary face. This doesn't necessarily make sense for vectors but provided you know how you want to treat the boundary you can create a custom vector boundary condition using these classes as examples.
To initialize all the fields without errors, remove the creation of your mapping and neighbour fields from the boundary constructors. This is done in regionCouple by storing names of neighbour patches, regions and fields rather than references to the patches, and then using an on-the-fly lookup for the neighbouring patch. The other option is to use pointers, e.g. for patchToPatchInterpolation, and only set the pointer when needed. The final thing... make sure you don't call correctBoundaryConditions() before all fields and meshes have been created.
Hope this helps
|All times are GMT -4. The time now is 04:29.|