CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   wallHeatFlux utility for an incompressible case (https://www.cfd-online.com/Forums/openfoam-post-processing/101972-wallheatflux-utility-incompressible-case.html)

Naresh yathuru April 15, 2015 13:33

Quote:

Thanks for your reply. I just downloaded the zipfile given in this thread. After that I am not understanding if to copy the folder to "/applications/utilities" or some other steps to follow. Please help me.
Hi,
I also had the same confusion thanks to wyldkat fot the wiki page. you dont have to copy it into application/utilities.
follow this page

https://github.com/wyldckat/wallHeatFluxIncompressible

Note: follow the second procedure using zip

I followed that. basically it works hope it also works for you. let me know if u face any problem.

regards,
Naresh

gomsy1987 April 16, 2015 02:51

Thank you so much Naresh. I did as mentioned in the page. I guess now I can directly use the utility.

Regards
Gautam

hiuluom July 24, 2015 14:07

1 Attachment(s)
Hi everybody,

When I tried wallHeatFlux the buoyantSimpleFoam OF 2.1.1 with thermo type as first comment of topic it was no problem:
Code:

hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;
But in sonicFoam has difference thermo:
Code:

ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>;
I used the wallHeatFluxRho and wallHeatflux (default) which was provide in forum, OF 2.1.1 and had been a problem:
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.1-221db2718bbb
Exec  : wallHeatFlux -latestTime
Date  : Jul 25 2015
Time  : 06:53:06
Host  : "CompEng"
PID    : 2979
Case  : /home/huynh/OpenFOAM/huynh-2.1.1/run/prism
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0.0003
Time = 0.0003
Selecting thermodynamics package ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>

--> FOAM FATAL ERROR:
Not implemented
    From function basicThermo::h()
    in file basicThermo/basicThermo.C at line 260.
FOAM aborting
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2  Foam::basicThermo::h() in "/opt/openfoam211/platforms/linuxGccDPOpt/lib/libbasicThermophysicalModels.so"
#3 
 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/wallHeatFlux"
#4  __libc_start_main in "/lib/tls/i686/cmov/libc.so.6"
#5 
 in "/opt/openfoam211/platforms/linuxGccDPOpt/bin/wallHeatFlux"
Aborted

Does anybody explain why wallHeatFlux and wallHeatFluxRho only compute to hPsiThermo instead of other thermo type?

hiuluom July 25, 2015 12:10

In sonicFoam the thermophyscialProperties is:
Code:

thermoType      ePsiThermo<pureMixture<constTransport<specieThermo<eConstThermo<perfectGas>>>>>;

mixture
{
    specie
    {
        nMoles          1;
        molWeight      28.9;
    }
    thermodynamics
    {
        Cv              717.5;
        Hf              0;
    }
    transport
    {
        mu              1.8e-05;
        Pr              0.7;
    }
}

and I changed it (the simulation was done)
Code:

thermoType      hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>;

pRef            100000;

mixture
{
    specie
    {
        nMoles          1;
        molWeight      28.9;
    }
    thermodynamics
    {
        Cp              1000;
        Hf              0;
    }
    transport
    {
        mu              1.8e-05;
        Pr              0.7;
    }
}

Now, it can run with wallHeatFlux as well as wallHeatFluxRho
Code:

/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.1.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.1.1-221db2718bbb
Exec  : wallHeatFluxRho -latestTime
Date  : Jul 25 2015
Time  : 22:05:09
Host  : "CompEng"
PID    : 4590
Case  : /home/huynh/OpenFOAM/huynh-2.1.1/run/prism
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0.0003

Time = 0.0003
Selecting thermodynamics package hPsiThermo<pureMixture<constTransport<specieThermo<hConstThermo<perfectGas>>>>>
Reading/calculating face flux field phi

Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu            0.09;
    C1              1.44;
    C2              1.92;
    C3              -0.33;
    sigmak          1;
    sigmaEps        1.3;
    Prt            1;
}


Wall heat fluxes [W]
prismWall 0

End

But I would like to calculate wallheatFlux so that it don't need to change the thermo type. I hope to receive the suggest.
Thank you.

niko0807 October 4, 2015 11:28

Dear Bruno,

I am trying to use your wallHeatFluxIncompressible utility from

https://github.com/wyldckat/wallHeatFluxIncompressible

I have followed the instructions, but when i run wmake, I get plenty of errors like the following:

Code:

/opt/local/include/gcc46/c++/cwchar:66:11: error: '::mbstate_t' has not been declared
/opt/local/include/gcc46/c++/cwchar:141:11: error: '::wint_t' has not been declared
/opt/local/include/gcc46/c++/cwchar:143:11: error: '::btowc' has not been declared
/opt/local/include/gcc46/c++/cwchar:144:11: error: '::fgetwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:145:11: error: '::fgetws' has not been declared
/opt/local/include/gcc46/c++/cwchar:146:11: error: '::fputwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:147:11: error: '::fputws' has not been declared
/opt/local/include/gcc46/c++/cwchar:148:11: error: '::fwide' has not been declared
/opt/local/include/gcc46/c++/cwchar:149:11: error: '::fwprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:150:11: error: '::fwscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:151:11: error: '::getwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:152:11: error: '::getwchar' has not been declared
/opt/local/include/gcc46/c++/cwchar:153:11: error: '::mbrlen' has not been declared
/opt/local/include/gcc46/c++/cwchar:154:11: error: '::mbrtowc' has not been declared
/opt/local/include/gcc46/c++/cwchar:155:11: error: '::mbsinit' has not been declared
/opt/local/include/gcc46/c++/cwchar:156:11: error: '::mbsrtowcs' has not been declared
/opt/local/include/gcc46/c++/cwchar:157:11: error: '::putwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:158:11: error: '::putwchar' has not been declared
/opt/local/include/gcc46/c++/cwchar:160:11: error: '::swprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:162:11: error: '::swscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:163:11: error: '::ungetwc' has not been declared
/opt/local/include/gcc46/c++/cwchar:164:11: error: '::vfwprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:166:11: error: '::vfwscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:169:11: error: '::vswprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:172:11: error: '::vswscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:174:11: error: '::vwprintf' has not been declared
/opt/local/include/gcc46/c++/cwchar:176:11: error: '::vwscanf' has not been declared
/opt/local/include/gcc46/c++/cwchar:178:11: error: '::wcrtomb' has not been declared
/opt/local/include/gcc46/c++/cwchar:179:11: error: '::wcscat' has not been declared

and when I type

Code:

wallHeatFluxIncompressible
in a buoyantBoussinesqPimpleFoamcase case, I get

Code:

-bash: wallHeatFluxIncompressible: command not found
Do you know how to solve this problem?

wyldckat October 4, 2015 16:20

Quick answers:

@hiuluom: Sorry for the late reply, but here are the answers:
Quote:

Originally Posted by hiuluom (Post 556880)
Does anybody explain why wallHeatFlux and wallHeatFluxRho only compute to hPsiThermo instead of other thermo type?

Quote:

Originally Posted by hiuluom (Post 556949)
But I would like to calculate wallheatFlux so that it don't need to change the thermo type. I hope to receive the suggest.
Thank you.

I gotta go back and read this thread again, but I have the vague idea that the "wallHeatFluxRho" variant was created because the RhoThermo option wasn't supported!?

... Ah, no, I had this vague memory and this was done by someone else in another thread. You can find the details on how to do this here: http://www.cfd-online.com/Forums/ope...tml#post476479 - post #3


_________________


@niko0807:
Quote:

Originally Posted by niko0807 (Post 566451)
I have followed the instructions, but when i run wmake, I get plenty of errors like the following:
Code:

/opt/local/include/gcc46/c++/cwchar:66:11: error: '::mbstate_t' has not been declared

Are you perhaps building on Mac OS X? If you are, then I have to ask: were you able to build OpenFOAM from source code or did you use an image that had it pre-built/installed?
I ask this because if you are not able to build OpenFOAM (or foam-extend) from source code, then you will not be able to build this utility from source code.

niko0807 October 5, 2015 08:57

I am building building on Mac OS X from an image, so that is definitely the problem. Thanks for noticing that.

If I build OpenFOAM from this:

http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x

Would that be building from source code or is that also an image build?

hiuluom October 6, 2015 01:58

Hi Bruno,

i solved my problem at here: http://www.cfd-online.com/Forums/ope...sonicfoam.html

Thanks your reply.

Thanh

wyldckat October 8, 2015 19:33

Quote:

Originally Posted by niko0807 (Post 566571)
If I build OpenFOAM from this:

http://openfoamwiki.net/index.php/In...OpenFOAM_2.3.x

Would that be building from source code or is that also an image build?

Quick answer: Those instructions are for building from source code.

thiagopl December 27, 2015 14:15

Hi all,

If you look at the utility wallshearStress, it has the options for compressible and incompressible flow (apparently only for RANS modelling). Maybe somebody (not me :D) could add this functionality to the wallHeatFlux utility and create a more general one which would work for both types of fluid.

Regards,

wyldckat January 2, 2016 18:47

Greetings Thiago,

I do have this on my to-do list and I've been taking a look into this for the past hour or so.
The conclusion I've reached so far is that such a feature is currently (in OpenFOAM 3.0) rather limited, because the boundary condition "turbulentHeatFluxTemperature" only exists in compressible form.

I then remembered about a recent bug report: http://www.openfoam.org/mantisbt/view.php?id=1856 - essentially the explicit "Boussinesq" solver implementations will be dropped in favour of the more general implementation that was introduced in the commits related to this bug report.

Therefore, it no longer makes sense to implement an explicit incompressible version of wallHeatFlux, since it's just a matter of using the incompressible thermodynamic implementation and the respective Boussinesq equation of state.

Best regards,
Bruno

hcl734 January 18, 2016 08:46

Quote:

Originally Posted by wyldckat (Post 579325)

The conclusion I've reached so far is that such a feature is currently (in OpenFOAM 3.0) rather limited, because the boundary condition "turbulentHeatFluxTemperature" only exists in compressible form.

Do you know why it only exists in compressible form and what would be the alternative for an incompressible solver?
I used OF 2.4.0 for some testcases with turbulentHeatFluxTemperature and it works fine. So now I am a little confused why there is no turbulentHeatFluxTemperature in Vers 3.0.

wyldckat January 31, 2016 13:08

Greetings hcl734,
Quote:

Originally Posted by hcl734 (Post 581380)
Do you know why it only exists in compressible form and what would be the alternative for an incompressible solver?
I used OF 2.4.0 for some testcases with turbulentHeatFluxTemperature and it works fine. So now I am a little confused why there is no turbulentHeatFluxTemperature in Vers 3.0.

The reason is very simple: Maintenance.

Having nearly-duplicated code, leads to having to maintain all of the duplicate parts of the code. If a bug is found in one of them, it will have to be fixed in the other as well. This means that after fixing the bug, it's also necessary to test if the bug was fixed for both parts. Therefore, what was a simple bug that took 20 minutes to solve, can lead to 1 hour or more to fix both bugs, given that the incompressible implementation needs an adapted case for testing the same issue.

1 hour might not seem a lot to you, but take a look at how many bugs are currently open on the bug tracker: http://www.openfoam.org/mantisbt/my_view_page.php - at the time of this writing, 90 issues are still open and unassigned, potentially representing somewhere between 90h to several hundreds of hours to solve of all of those reports.

And because most thermodynamic problems require compressible fluid flow, it makes sense that the Boussinesq approach becomes a modelling strategy that is integrated into the compressible side of things.

If you want to use the incompressible form of the Boussinesq implementation, the easiest solution is to keep using OpenFOAM 2.4.x ;).

Best regards,
Bruno

benz25 February 10, 2016 01:52

Heat Flux for incompressible laminar flows
 
1 Attachment(s)
Dear Bruno,

I'm trying to set up a case based on incompressible laminar flow (air) with heat flux boundary condition in the modified icoFoam solver (which has the energy equation). I'm trying to assign a heat flux B.C. on the circular obstruction wall (see attached image). I've installed the wallHeatFluxIncompressible (v2.3) utility. When I run my_icoFoam (Iím using OpenFOAM 2.4.0). I get the following error:

Code:

--> FOAM FATAL IO ERROR:
Unknown patchField type turbulentHeatFluxTemperature for patch type wall

Valid patchField types are :

62
(
advective
calculated
codedFixedValue
codedMixed
cyclic
.
.
.
.

I then tried to run the same case using buoyanBoussinesqSimpleFoam but I get the following error:

Code:

--> FOAM FATAL IO ERROR:
keyword rhoCp0 is undefined in dictionary "/home/OpenFOAM-2.4.0/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/1A/constant/transportProperties"

file: /home/OpenFOAM-2.4.0/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/1A/constant/transportProperties from line 17 to line 44.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 442.

FOAM exiting

Iíve been stuck on this for a while now and Iím not sure about this rhoCp0 error.

For the icoFoam directory these are my boundary conditions and other settings:

U

Code:

dimensions      [0 1 -1 0 0 0 0];

internalField  uniform (0 0 0);

boundaryField
{
    lowerwall
    {
        type            fixedValue;
        value                uniform (0 0 0);
    }

    upperwall
    {
        type            fixedValue;
        value                uniform (0 0 0);
    }

    circle
    {
        type            fixedValue;
        value                uniform (0 0 0);
    }

    inlet
    {
        type            fixedValue;
        value                uniform (0.1 0 0);
    }

    outlet
    {
        type            zeroGradient;
    }

    frontAndBack
    {
        type            empty;
    }
}

T

Code:

dimensions      [0 0 0 1 0 0 0];

internalField    uniform 300;

boundaryField
{
    lowerwall
    {
      type            zeroGradient;
    }

    upperwall
    {
        type            zeroGradient;
    }

    circlewall
    {
        type turbulentHeatFluxTemperature;
        value uniform 300;
        q uniform 1000.0;  "q" is heat flux then what's "value"?
        heatSource flux;
        alphaEff alphaEff;
    }

    inlet
    {
        type            fixedValue;
        value                uniform 300;
    }

    outlet
    {
        type            fixedValue;
        value                uniform 300;
    }

    frontAndBack
    {
        type            empty;
    }
}

P

Code:

dimensions      [0 2 -2 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    lowerwall
    {
        type            zeroGradient;
    }

    upperwall
    {
        type            zeroGradient;
    }

    circlewall
    {
        type            zeroGradient;
    }

    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value        uniform 0;
    }

    frontAndBack
    {
        type            empty;
    }
}

gradT

Code:

boundaryField
{
    lowerwall
    {
        type            calculated;
        value          uniform 0;
    }
    upperwall
    {
        type            calculated;
        value          uniform 0;
    }
    circlewall
    {
        type            calculated;
        value          uniform 0;
    }
    inlet
    {
        type            calculated;
        value          uniform 0;
    }
    outlet
    {
        type            calculated;
        value          uniform 0;
    }
    frontAndBack
    {
        type            empty;
    }
}

wallHeatFlux

Code:

boundaryField
{
    bottomwall
    {
        type            calculated;
        value          uniform 0;
    }
    topwall
    {
        type            calculated;
        value          uniform 0;
    }
    obstructionwall
    {
        type            calculated;
        value          uniform 0;
    }
    inlet
    {
        type            calculated;
        value          uniform 0;
    }
    outlet
    {
        type            calculated;
        value          uniform 0;
    }
    frontAndBack
    {
        type            empty;
    }
}

wallGradT

Code:

dimensions      [0 -1 0 1 0 0 0];

internalField  uniform 0;

boundaryField
{
    lowerwall
    {
        type            calculated;
        value          uniform 0;
    }
    upperwall
    {
        type            calculated;
        value          uniform 0;
    }
    circlewall
    {
        type            calculated;
        value          uniform 0;
    }
    inlet
    {
        type            calculated;
        value          uniform 0;
    }
    outlet
    {
        type            calculated;
        value          uniform 0;
    }
    frontAndBack
    {
        type            empty;
    }
}

transportProperties

Code:

nu              nu [ 0 2 -1 0 0 0 0 ] 1.5e-05;

DT              DT [0 2 -1 0 0 0 0] 22e-06;

For the buoyantBoussinesqSimpleFoam solver, same B.C.ís as above with the additional files:

alphat

Code:

dimensions [ 0 2 -1 0 0 0 0 ];
internalField uniform 0.0;
boundaryField
{
    lowerwall
    {
        type alphatJayatillekeWallFunction;
        Prt 0.85;
        value uniform 0.0;
    }

    upperwall
    {
        type alphatJayatillekeWallFunction;
        Prt 0.85;
        value uniform 0.0;
    }

    inlet
    {
        type calculated;
        //Prt 0.85;
        value uniform 0.0;
    }

    outlet
    {
        type calculated;
        //Prt 0.85;
        value uniform 0.0;
    }

    circlewall
    {
        type alphatJayatillekeWallFunction;
        Prt 0.85;
        value uniform 0.0;
    }

    frontAndBack
    {
        type empty;
    }

kappaEff

Code:

dimensions      [0 2 -1 0 0 0 0];

internalField  uniform 1.764591978e-05;

boundaryField
{
    lowerwall
    {
        type            calculated;
        value          uniform 1.764591978e-05;
    }
    upperwall
    {
        type            calculated;
        value          uniform 1.764591978e-05;
    }
    inlet
    {
        type            calculated;
        value          uniform 1.764591978e-05;
    }
    outlet
    {
        type            calculated;
        value          uniform 1.764591978e-05;
    }
    circlewall               
    {
        type            calculated;
        value          uniform 1.764591978e-05;
    }
    frontAndBack
    {
        type            empty;
    }
}

p_rgh

Code:

dimensions [ 0 2 -2 0 0 0 0 ];
internalField uniform 0.0;
boundaryField
{
    lowerwall
    {
        type fixedFluxPressure;
        value uniform 0;
        rho rhok;
    }

    upperwall
    {
        type fixedFluxPressure;
        value uniform 0;
        rho rhok;
    }

    circlewall
    {
        type fixedFluxPressure;
        value uniform 0;
        rho rhok;
    }

    inlet
    {
        type fixedFluxPressure;
        value uniform 0;
        rho rhok;
    }

    outlet
    {
        type fixedFluxPressure;
        value uniform 0;
        rho rhok;
    }

    frontAndBack
    {
        type empty;
    }

transportProperties

Code:

transportModel Newtonian;

// Laminar viscosity
nu nu [0 2 -1 0 0 0 0] 1.7e-05;

// Thermal expansion coefficient
beta beta [0 0 0 -1 0 0 0] 3.4482e-03; // 1/Tref

// Reference temperature
TRef TRef [0 0 0 1 0 0 0] 300;

// Laminar Prandtl number
Pr Pr [0 0 0 0 0 0 0] 0.9;

// Turbulent Prandtl number
Prt Prt [0 0 0 0 0 0 0] 0.7;

// Cp0 value needed for wallHeatFluxIncompressible
//rho0 rho0 [1 -3 0 0 0 0 0] 1.2;

// rho0 value needed for wallHeatFluxIncompressible
//Cp0 1005;

// Cp0 value needed for wallHeatFluxIncompressible
rho0 rho0 [1 -3 0 0 0 0 0] 1;

// rho0 value needed for wallHeatFluxIncompressible
Cp0 1005;

Any help would be much appreciated :D

Many thanks.

Kevin

benz25 February 28, 2016 00:54

Heat Flux for incompressible laminar flows
 
Anyone knows how to tackle this ? :D

wyldckat March 19, 2016 17:40

Greetings Kevin,

Sorry for the late reply, but now that I've read your post, I'm afraid I sighed very heavily :(...

Quote:

Originally Posted by benz25 (Post 584456)
I then tried to run the same case using buoyanBoussinesqSimpleFoam but I get the following error:

Code:

--> FOAM FATAL IO ERROR:
keyword rhoCp0 is undefined in dictionary "/home/OpenFOAM-2.4.0/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/1A/constant/transportProperties"

file: /home/OpenFOAM-2.4.0/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/1A/constant/transportProperties from line 17 to line 44.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 442.

FOAM exiting

Iíve been stuck on this for a while now and Iím not sure about this rhoCp0 error.

The reason why I sighed is because the solver has told you exactly what went wrong and what's missing: it's missing the "rhoCp0" entry from the file "constant/transportProperties".

After scrolling through your post (please, next time package the case folder into a ZIP file and attach it in your post or share in a file sharing website, such as DropBox), you have the following entry:
Quote:

Originally Posted by benz25 (Post 584456)
transportProperties
Code:

transportModel Newtonian;

// Laminar viscosity
nu nu [0 2 -1 0 0 0 0] 1.7e-05;

// Thermal expansion coefficient
beta beta [0 0 0 -1 0 0 0] 3.4482e-03; // 1/Tref

// Reference temperature
TRef TRef [0 0 0 1 0 0 0] 300;

// Laminar Prandtl number
Pr Pr [0 0 0 0 0 0 0] 0.9;

// Turbulent Prandtl number
Prt Prt [0 0 0 0 0 0 0] 0.7;

// Cp0 value needed for wallHeatFluxIncompressible
//rho0 rho0 [1 -3 0 0 0 0 0] 1.2;

// rho0 value needed for wallHeatFluxIncompressible
//Cp0 1005;

// Cp0 value needed for wallHeatFluxIncompressible
rho0 rho0 [1 -3 0 0 0 0 0] 1;

// rho0 value needed for wallHeatFluxIncompressible
Cp0 1005;


As you can see, there are 2 related entries: "rho0" and " Cp0". The missing the "rhoCp0" entry is essentially "rho0*Cp0".

If you had studied this post: http://www.cfd-online.com/Forums/ope...tml#post516950 - post #27, you would then possibly end up here: http://www.openfoam.org/mantisbt/view.php?id=1433#c3548 - where I explain in summary detail what's going on:
Code:

3.b) One perfectionist proposition is to enforce the correct units when reading from the dictionary, e.g.:


       
Code:

       
Cp0 Cp0 [1 -1 -2 -1 0 0 0] 1000.0;


Henry's next comment there states the following:
Code:

Replaced Cp0 with rhoCp0 and added comment concerning units to clarify usage
Do you now see what you need to do? If not, the solution is very simple, add the following line to the file "constant/transportProperties":
Code:

rhoCp0 rhoCp0 [1 -1 -2 -1 0 0 0] 1005.0;
Hopefully this will work as intended, since I didn't test this myself. Nonetheless, when in doubt, check the OpenFOAM tutorials for examples! ;)

Best regards,
Bruno

wyldckat March 19, 2016 17:50

The following reply is for Scram_1's question sent via PM, which I believe is best answered here for the benefit of other who are using ports of OpenFOAM on Windows (and no, I'm not referring to Docker ;)).

The question/problem was this (well, it's just part of the message):
Quote:

Originally Posted by Scram_1
I was just going through the thread on wallHeatFluxUtility for an incompressible case (http://www.cfd-online.com/Forums/ope...le-case-3.html). I downloaded the zip file from github as you had mentioned in one of your posts. But I'm not able to compile the utility. When I do wmake, it's throwing up some errors which I'm not able to rectify
Here is the error message.
Code:

ofuser@OFMACHINE /cygdrive/c/Users/ofuser/Desktop/OpenFOAM/wallHeatFluxIncompressible-OF23x
$ wmake
Making dependency files...
SOURCE=wallHeatFluxIncompressible.C ; x86_64-w64-mingw32-g++ -m64 -Dcygwin64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/turbulenceModel -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/MSWindows/lnInclude -c $SOURCE -o Make/cygwin64mingw-w64DPOpt/wallHeatFluxIncompressible.o
x86_64-w64-mingw32-g++ -m64 -Dcygwin64 -DWM_DP -DMSWIN -DLITTLE_ENDIAN -Wall -Wextra -Wno-unused-parameter -Wnon-virtual-dtor -O3 -DNDEBUG -DNoRepository -ftemplate-depth-100 -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/meshTools/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/turbulenceModels/incompressible/turbulenceModel -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/transportModels -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/transportModels/incompressible/singlePhaseTransportModel -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude -I/opt/OpenFOAM/OpenFOAM-2.3.x/src/OSspecific/MSWindows/lnInclude -Wl,--enable-auto-import,--enable-auto-image-base,--force-exe-suffix,--strip-all Make/cygwin64mingw-w64DPOpt/wallHeatFluxIncompressible.o -L/opt/OpenFOAM/OpenFOAM-2.3.x/platforms/cygwin64mingw-w64DPOpt/lib \
-lincompressibleTransportModels -lincompressibleRASModels -lincompressibleLESModels -lfiniteVolume -lmeshTools -lOpenFOAM -lm -o /cygdrive/c/OpenFOAM/ofuser-2.3.x/platforms/cygwin64mingw-w64DPOpt/bin/wallHeatFluxIncompressible.exe
Make/cygwin64mingw-w64DPOpt/wallHeatFluxIncompressible.o:wallHeatFluxIncompressible.C.text.startup+0xdd4): undefined reference to `Foam::incompressible::turbulenceModel::New(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::transportModel&, Foam::word const&)'
Make/cygwin64mingw-w64DPOpt/wallHeatFluxIncompressible.o:wallHeatFluxIncompressible.C.rdata$.refptr._ZN4Foam14incompressible15turbulenceModel8typeNameE[.refptr._ZN4Foam14incompressible15turbulenceModel8typeNameE]+0x0): undefined reference to `Foam::incompressible::turbulenceModel::typeName'
collect2: error: ld returned 1 exit status
/opt/OpenFOAM/OpenFOAM-2.3.x/wmake/Makefile:155: recipe for target '/cygdrive/c/OpenFOAM/ofuser-2.3.x/platforms/cygwin64mingw-w64DPOpt/bin/wallHeatFluxIncompressible.exe' failed
make: *** [/cygdrive/c/OpenFOAM/ofuser-2.3.x/platforms/cygwin64mingw-w64DPOpt/bin/wallHeatFluxIncompressible.exe] Error 1


I've renamed the user name and machine for security reasons.

The problem is somewhat simple: Windows is more picky about which libraries an executable should link to at build time... as a safety measure.
Anyway, the solution is to add the missing libraries in the file "Make/options", namely the list "EXE_LIBS". Change this:
Code:

EXE_LIBS = \
    -lincompressibleTransportModels \
    -lincompressibleRASModels \
    -lincompressibleLESModels \
    -lfiniteVolume \
    -lmeshTools

to this:
Code:

EXE_LIBS = \
    -lincompressibleTransportModels \
    -lincompressibleRASModels \
    -lincompressibleLESModels \
    -lincompressibleTurbulenceModel \
    -lfiniteVolume \
    -lmeshTools

Because the missing methods that the linker is complaining about are defined in the library "libincompressibleTurbulenceModel.so".

Best regards,
Bruno

Scram_1 March 19, 2016 18:52

Working like a charm now...
Thanks Bruno!!!

benz25 March 25, 2016 05:37

Wall Heat Flux
 
Dear Bruno,

Thank you for your kind assistance! I've studied the posts you've shared, and have included rhoCp0 in transportProperties. Afterwards, I got this error:

Code:

wrong token type - expected Scalar, found on line 40 the word 'rhoCp0'
The same error was reported before
HTML Code:

http://www.cfd-online.com/Forums/openfoam-pre-processing/104815-turbulentheatfluxtemperature.html
In that link, according to post # 4 their error was based on Cp0, so to fix the rhoCp0 error in my case, I simply replaced:

Code:

rhoCp0 rhoCp0 [1 -1 -2 -1 0 0 0] 1005.0
with

Code:

rhoCp0 1005.0;
That removed the error.

Kind Regards,

Kevin

ruedanestor May 3, 2016 15:12

Hi Bruno,

I didn't read your comment about maintenability before, however, I have updated the utility so it can work with OF 3.0.1.

I'd like to share it with you so you could upload it if you find it useful.

Regards.

Nestor


All times are GMT -4. The time now is 22:26.