CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Finding calculation of T_ field (http://www.cfd-online.com/Forums/openfoam-programming-development/105309-finding-calculation-t_-field.html)

Tobi July 27, 2012 09:02

Finding calculation of T_ field
 
Hi all,

I want to implement the wallHeatFlux BC for the T-Field in my solver. For now I can use the BC but the calculation of the T faces of the boundary is not working. I get still the values of the initial Temperature (its like i have a fixedValue BC).

How do I test the values of the T_ faces?
After calculate of hEqn.H there is the thermo.correct() code.
I had a look at the correct function and there I found that:
Code:

template<class MixtureType>
void Foam::hPdfThermo<MixtureType>::correct()
{
        // force the saving of the old-time values
        psi_.oldTime();

        if (counter == propertyUpdate)
        {
                Info << "Updating look-up table extractions..." << endl;
                update();
                counter = 0;
        }

        if (counter_mass_fractions == massFractionsUpdate)
        {
                Info << "Updating mass fraction extractions..." << endl;
                updateMassFractions();
                counter_mass_fractions = 0;
        }


        Debug();        // added by myself

        calculate();

        counter++;
        counter_mass_fractions++;
}

And in the Debug-Function I am getting the face-values:

Code:

template<class MixtureType>
void Foam::hPdfThermo<MixtureType>::Debug()
{
        Info << "Debug" << endl;


        forAll(csi_.boundaryField(), patchi)
        {
                if(isA<wallHeatTransferFvPatchScalarField>(T_.boundaryField()[patchi])) 
                {
                        const fvPatchScalarField & pcsi = csi_.boundaryField()[patchi];
                        const fvPatchScalarField & pT  = T_.boundaryField()[patchi];

                        forAll(pcsi, facei)
                        {
                                Info << "T = " << pT[facei] << endl;
                        }
                }
        }
}

Now my question is, how can I figure out why the BC wallHeatTransfer is not working, or is it working and I made some errors?
Normally I should get different values of the face-values (or not?) ...

And if I get the enthalpy equation. Where is the solver solving the temperature eqn or calculate it from the enthalpy?


Tobi

Tobi July 27, 2012 09:38

Hi,

its me again. I find it out. There is no calculation of the scalar T field.
Well ... thanks for readying.

Tobi


All times are GMT -4. The time now is 00:33.