||January 28, 2013 04:52
build my own multi-region solver : pb with flux continuity
I am currently trying to develop my own multi-region solver. For sake of simplicity, let's say I have two regions, a "solid" and a "fluid". I want to solve heat transfers in both regions, with continuity and flux continuity at the solid/fluid interface.
Basically, I defined a solid_to_fluid and a fluid_to_solid patch to patch interpolation
I apply successfully the value of Ts at the solid/fluid interface as a boundary condition for Tf :
scalarField &TsP = Ts.boundaryField()[labelSolid];
scalarField &TfP = Tf.boundaryField()[labelFluid];
TfP = solid_to_fluid.faceInterpolate(TsP);
This part is ok.
My problem concern the flux continuity at the region interface. I want to apply the flux continuity imposing the solid temperature gradient at the interface with
vectorField n = fluidMesh.boundary()[labelFluid].nf();
volVectorField gradTf = DTf/DTs*fvc::grad(Tf);
scalarField nGradTf = n & gradTf.boundaryField()[labelFluid] ;
scalarField& gradTsField = gradTsPatch.gradient();
gradTsField = p2_to_p1.faceInterpolate(nGradTf);
However it fails to have good result, and I can't have flux continuity. Is someone have an idea to solve my problem ?