CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   RegionCoupling - openfoam 1.6ext (

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:


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


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( &;    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


mm.abdollahzadeh June 20, 2013 13:44

please give me some idea

All times are GMT -4. The time now is 16:59.