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/)
-   -   Find patch-type (https://www.cfd-online.com/Forums/openfoam-programming-development/105260-find-patch-type.html)

Tobi July 26, 2012 07:49

Find patch-type
 
Hi together,

I wanna find a patch type while initializing the thermodynamics:

Therefor I can find patches with FixedValues like:

Code:


        forAll(T_.boundaryField(), patchi)

        {

                if (isA<fixedValueFvPatchScalarField>(T_.boundaryField()[patchi]))
                {
                        Info << "Patch Fixed Temperature " << patchi << endl;
                        patch_type.push_back(1);
                }
            }

Now I wanna find the patchtype "wallHeatTransfer". I did it like befor:
Code:

        forAll(T_.boundaryField(), patchi)

        {

                Info << <fixedValueFvPatchScalarField>T_.boundaryField()[patchi] << endl;

                if (isA<fixedValueFvPatchScalarField>(T_.boundaryField()[patchi]))
                {
                        Info << "Patch Fixed Temperature " << patchi << endl;
                        patch_type.push_back(1);
                }
              else if (isA<wallHeatTransferFvPatchScalarField>(T_.boundaryField()[patchi]))
              {
                      Info << "Patch wallHeatTransfer " << patchi << endl;
                      patch_type.push_back(2);
              }

But I get an eerror while compiling, that <wallHeatTransferFvPatchScalarField> is not defined.

Well is there an lnInclude file missing?

Tobi

Tobi July 26, 2012 07:58

I solved my problem while writing the threat.

There was a lnInclude File missing .)


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