CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

wallHeatFlux utility for an incompressible case

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree31Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2015, 13:33
Default
  #41
Member
 
Naresh Yathuru
Join Date: Feb 2015
Posts: 66
Rep Power: 6
Naresh yathuru is on a distinguished road
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
Naresh yathuru is offline   Reply With Quote

Old   April 16, 2015, 02:51
Default
  #42
New Member
 
Gautam Saikia
Join Date: Jan 2015
Location: India
Posts: 12
Rep Power: 6
gomsy1987 is on a distinguished road
Thank you so much Naresh. I did as mentioned in the page. I guess now I can directly use the utility.

Regards
Gautam
gomsy1987 is offline   Reply With Quote

Old   July 24, 2015, 14:07
Default
  #43
Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 94
Rep Power: 8
hiuluom is on a distinguished road
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?
Attached Files
File Type: zip wallHeatFluxRho.zip (94.4 KB, 8 views)

Last edited by hiuluom; July 24, 2015 at 20:54.
hiuluom is offline   Reply With Quote

Old   July 25, 2015, 12:10
Default
  #44
Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 94
Rep Power: 8
hiuluom is on a distinguished road
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.

Last edited by hiuluom; July 25, 2015 at 22:26.
hiuluom is offline   Reply With Quote

Old   October 4, 2015, 11:28
Default
  #45
New Member
 
Nikolai Tauber
Join Date: Sep 2015
Location: Aarhus, Denmark
Posts: 14
Rep Power: 6
niko0807 is on a distinguished road
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?
niko0807 is offline   Reply With Quote

Old   October 4, 2015, 16:20
Default
  #46
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:

@hiuluom: Sorry for the late reply, but here are the answers:
Quote:
Originally Posted by hiuluom View Post
Does anybody explain why wallHeatFlux and wallHeatFluxRho only compute to hPsiThermo instead of other thermo type?
Quote:
Originally Posted by hiuluom View Post
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 View Post
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.

Last edited by wyldckat; October 8, 2015 at 19:31. Reason: fixed small typo
wyldckat is offline   Reply With Quote

Old   October 5, 2015, 08:57
Default
  #47
New Member
 
Nikolai Tauber
Join Date: Sep 2015
Location: Aarhus, Denmark
Posts: 14
Rep Power: 6
niko0807 is on a distinguished road
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?
niko0807 is offline   Reply With Quote

Old   October 6, 2015, 01:58
Default
  #48
Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 94
Rep Power: 8
hiuluom is on a distinguished road
Hi Bruno,

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

Thanks your reply.

Thanh
wyldckat likes this.
hiuluom is offline   Reply With Quote

Old   October 8, 2015, 19:33
Default
  #49
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by niko0807 View Post
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.
wyldckat is offline   Reply With Quote

Old   December 27, 2015, 14:15
Lightbulb
  #50
Member
 
Thiago Parente
Join Date: Sep 2011
Location: Diamantina, Brazil.
Posts: 41
Rep Power: 10
thiagopl is on a distinguished road
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 ) could add this functionality to the wallHeatFlux utility and create a more general one which would work for both types of fluid.

Regards,
__________________
Fields of interest: Heat transfer; Convection heat transfer; Conjugate heat transfer.
thiagopl is offline   Reply With Quote

Old   January 2, 2016, 18:47
Default
  #51
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   January 18, 2016, 08:46
Default
  #52
Member
 
Join Date: May 2015
Posts: 68
Rep Power: 6
hcl734 is on a distinguished road
Quote:
Originally Posted by wyldckat View Post

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.
hcl734 is offline   Reply With Quote

Old   January 31, 2016, 13:08
Default
  #53
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings hcl734,
Quote:
Originally Posted by hcl734 View Post
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
romant and Naresh yathuru like this.
__________________
wyldckat is offline   Reply With Quote

Old   February 10, 2016, 01:52
Default Heat Flux for incompressible laminar flows
  #54
New Member
 
Join Date: Feb 2015
Posts: 18
Rep Power: 6
benz25 is on a distinguished road
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

Many thanks.

Kevin
Attached Images
File Type: jpg Domain.jpg (21.5 KB, 35 views)
benz25 is offline   Reply With Quote

Old   February 28, 2016, 00:54
Default Heat Flux for incompressible laminar flows
  #55
New Member
 
Join Date: Feb 2015
Posts: 18
Rep Power: 6
benz25 is on a distinguished road
Anyone knows how to tackle this ?
benz25 is offline   Reply With Quote

Old   March 19, 2016, 17:40
Default
  #56
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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 View Post
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 View Post
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 is offline   Reply With Quote

Old   March 19, 2016, 17:50
Default
  #57
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,942
Blog Entries: 42
Rep Power: 121
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
__________________
wyldckat is offline   Reply With Quote

Old   March 19, 2016, 18:52
Default
  #58
Member
 
Join Date: Oct 2015
Posts: 61
Rep Power: 6
Scram_1 is on a distinguished road
Working like a charm now...
Thanks Bruno!!!
Scram_1 is offline   Reply With Quote

Old   March 25, 2016, 05:37
Default Wall Heat Flux
  #59
New Member
 
Join Date: Feb 2015
Posts: 18
Rep Power: 6
benz25 is on a distinguished road
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
wyldckat and elham usefi like this.
benz25 is offline   Reply With Quote

Old   May 3, 2016, 15:12
Default
  #60
New Member
 
Nestor Rueda
Join Date: Apr 2016
Posts: 3
Rep Power: 5
ruedanestor is on a distinguished road
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
ruedanestor is offline   Reply With Quote

Reply

Tags
incompressible, open foam, wallheatflux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create an internal fan for a multiRegion case? phsieh2005 OpenFOAM 0 February 2, 2012 17:32
wallHeatFlux utility in OpenFoam1.6 maruthamuthu_venkatraman OpenFOAM 29 October 3, 2011 11:43
thermal analysis - how to model internal fan? Pei-Ying Hsieh Main CFD Forum 6 March 20, 2008 11:35
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 13:24
flow simulation across a small fan jane luo Main CFD Forum 15 April 12, 2004 18:49


All times are GMT -4. The time now is 19:02.