https://linen.dev logo
The difference in the codes lie in this: ```turb...
# programming
g
The difference in the codes lie in this:
Copy code
turbulentTemperatureCoupledBaffleFvPatchScalarField
Copy code
cpp
        tmp<scalarField> myKappaDelta = Kappa()*patch().deltaCoeffs();

        // Calculate common wall temperature.
        // Reuse *this to store common value.
        scalarField Twall
        (
            (myKappaDelta()*intFld() + nbrKappaDelta*nbrIntFld)
          / (myKappaDelta() + nbrKappaDelta)
        );
        // Assign to me
        fvPatchScalarField::operator=(Twall);
        // Distribute back and assign to neighbour
        mapDistribute::distribute
        (
            Pstream::defaultComms(),
            distMap.schedule(),
            nbrField.size(),
            distMap.constructMap(),     // reverse : what to send
            distMap.subMap(),
            Twall
        );
        const_cast<turbulentTemperatureCoupledBaffleFvPatchScalarField&>
        (
            nbrField
        ).fvPatchScalarField::operator=(Twall);
        
        fixedValueFvPatchScalarField::updateCoeffs();
Copy code
solidWallMixedTemperatureCoupledFvPatchScalarField
Copy code
cpp
    tmp<scalarField> myKappaDelta = Kappa()*patch().deltaCoeffs();

    this->refValue() = nbrIntFld;

    this->refGrad() = 0.0;

    this->valueFraction() = nbrKappaDelta / (nbrKappaDelta + myKappaDelta());

    Info<< "updating coeffs mixed" << endl;
    mixedFvPatchScalarField::updateCoeffs();