CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   RegionCoupling - openfoam 1.6ext (https://www.cfd-online.com/Forums/openfoam-programming-development/119618-regioncoupling-openfoam-1-6ext.html)

mm.abdollahzadeh June 20, 2013 13:26

RegionCoupling - openfoam 1.6ext
 
2 Attachment(s)
Dear All

Im trying to solve my previous case which was based on chtmultiregionfoam with conjucateheatfoam.
my boundary at the interface of solid and fluid looks like:

-K1grad(T1)=Ksgrad(Ts)+sigma

I dont use coorectboundarycondition for K . so I dont have harmonic interpolation of K. and for T I am doing the interpolation similar to energyRegionCoupledFvPatchScalarField in openfoam 2.2

Code:

Field<Type> fOwn = this->patchInternalField();
    Field<Type> fNei = this->patchNeighbourField();
    Field<Type> fOwnsigma = this->patchsigmaField();
    Field<Type> fNeisigma = this->patchsigmaNeighbourField();



    Field<Type> Alpha=this->patchDTField();
    scalarField fAlpha=mag(Alpha);
deltas(patch.nf() & patch.delta());    const fvPatch& patch = regionCoupledPatch_.patch();
    const scalarField alphaDelta(fAlpha/deltasii);
    Field<Type> nbrAlpha=this->patchDTNeighbourField();
    scalarField fnbrAlpha=mag(nbrAlpha);
    const scalarField nbrAlphaDelta(fnbrAlpha/nbrDeltasii);
    scalarField weightsd(fOwn.size()); 
    scalarField gweights(fOwn.size()); 

    forAll (weightsd, faceI)
    {
        scalar di = alphaDelta[faceI];
        scalar dni = nbrAlphaDelta[faceI];
        weightsd[faceI] = di/(di + dni);
        gweights[faceI] = 1.0/(di + dni);
    }
if (sigmaflag_==1)
{
    // Do interpolation
  Field<Type>::operator=(weightsd*fOwn + (1.0 - weightsd)*fNei-fOwnsigma*sigmaflag_*gweights-fNeisigma*sigmaflag_*gweights);
}


which sigma is just defined on surface of the interface. in the correct result I should get some sort of generation due to sigma and the internal field should be effected by that.

the boundary values that I get after modifying regioncoupling is the same as the values at the boundary that I get by chtmultiregion :D.
but its not puting any effect on the internal field !!!!!:confused::(.

I would appreciate any comment


best
mahdi

mm.abdollahzadeh June 20, 2013 13:44

please give me some idea

ZeinabM April 30, 2022 08:08

Hello Dr. Mahdi,
Have you found any solution for adding a refGradient value so we satisfy the harmonic mean in the interface? I am working on a similar case with Suzan model plasma. Thank you!


All times are GMT -4. The time now is 14:08.