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

wallHeatFlux in rhoCentralFoam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 11, 2015, 11:11
Default wallHeatFlux in rhoCentralFoam
  #1
New Member
 
chariton christou
Join Date: Feb 2014
Posts: 26
Rep Power: 4
charitonas is on a distinguished road
Hi,

I would like to calculate the wallHeatFlux with rhoCentralFoam but i always get an error:
"Trying to construct an genericFvPatchField on patch movingWall of field e"

I am using OpenFoam 2.1.x but i have tried it with newer versions and i couldn't figure it out.

Could anyone help me?
charitonas is offline   Reply With Quote

Old   June 12, 2015, 17:02
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,736
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick answer: Please provide more details. For example, which tutorial case can be used for achieving the same result?
I ask this because I tried "compressible/rhoCentralFoam/forwardStep" and got a completely different error.
wyldckat is offline   Reply With Quote

Old   June 12, 2015, 17:08
Default
  #3
New Member
 
chariton christou
Join Date: Feb 2014
Posts: 26
Rep Power: 4
charitonas is on a distinguished road
Hi Bruno,

I am trying my own case. A simple lid driven cavity flow.Here is my thermophysical properties.However,the problem arise from the T file and the smoluwskiJump property.I don't know why
Attached Files
File Type: doc thermophysicalProperties.doc (1.5 KB, 3 views)
File Type: doc T.doc (1.2 KB, 4 views)
charitonas is offline   Reply With Quote

Old   June 12, 2015, 17:37
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,736
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Hi Chariton,

Still doesn't get me much. Are you certain you're using 2.1.x?
Because I get this error message:
Code:
--> FOAM FATAL ERROR: 
Not implemented

    From function basicThermo::h()
    in file basicThermo/basicThermo.C at line 260.

FOAM aborting
My guess is that you have modified thermodynamics library.

Either way, try adding this line to your "system/controlDict":
Code:
libs ("librhoCentralFoam.so");
it should load the library that has that boundary condition.

Note: if you already have the "libs" entry, then keep in mind it's a list, e.g.:
Code:
libs (
"librhoCentralFoam.so"
"libOpenFOAM.so"
);
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   June 12, 2015, 17:44
Default
  #5
New Member
 
chariton christou
Join Date: Feb 2014
Posts: 26
Rep Power: 4
charitonas is on a distinguished road
Hi Bruno,

I did modified the library.I am now moved to Openfoam 2.2.2. My problem is that if i include the rhoCentralFoam in the libraries i will not get any error at all. However, when i try to view the results, the wallHeatFlux is always 0. Similar problem can be found on the post below.

Problem with snGrad() for heat flux.

I followed these instructions. The wallHeatFlux can work. My main questions-mentios are:

1)If i turn to OpenFoam 2.1.x i will get errors or not?
2)If i choose fixedValue in 0/T everything its ok.

A friend of mine suggested me the below:

snGrad(T) = grad(T) & n

n is normal vector that you need to define it.

But i don't know how to define the n normal vector. Could you help me defining that?

Thanks
Chariton
charitonas is offline   Reply With Quote

Old   June 12, 2015, 19:25
Default
  #6
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,736
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Quick answer:
  • Without a test case, the best I can suggest is that you edit the source code for your "wallHeatFlux" utility and comment out this line:
    Code:
    if (isA<wallFvPatch>(mesh.boundary()[patchi]))
    This line is what is enforcing that only walls can be used for calculating the heat flux.
  • As for your other question, I think you're trying to calculate something similar to "wallGradU", therefore, check the source code for it:
    Code:
    echo $FOAM_UTILITIES/postProcessing/wall/wallGradU/wallGradU.C
    There you'll see that "snGrad" should be accessible from the T field directly.
wyldckat is offline   Reply With Quote

Old   June 14, 2015, 12:35
Default
  #7
New Member
 
chariton christou
Join Date: Feb 2014
Posts: 26
Rep Power: 4
charitonas is on a distinguished road
Hi Bruno,
I have checked what you suggested me and i commented out that line but without any results. I have attached the test case if this can help
Attached Files
File Type: gz kn0.005.tar.gz (3.5 KB, 2 views)
charitonas is offline   Reply With Quote

Old   June 14, 2015, 12:43
Default
  #8
New Member
 
chariton christou
Join Date: Feb 2014
Posts: 26
Rep Power: 4
charitonas is on a distinguished road
Hi Bruno,

I am attaching also the wallHeatFlux
Attached Files
File Type: c HWwallHeatFlux.C (3.6 KB, 4 views)
File Type: h createFields.H (2.0 KB, 1 views)
charitonas is offline   Reply With Quote

Old   August 18, 2015, 16:06
Default
  #9
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,736
Blog Entries: 39
Rep Power: 103
wyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of lightwyldckat is a glorious beacon of light
Hi Chariton,

Sorry, but only today did I finally managed to look into this.
I've tested the case "kn0.005" that you provided in post #7 and I was able to get results by doing the following steps:
  1. I've used OpenFOAM 2.2.2 and I didn't make any changes to wallHeatFlux.
  2. I ran the following commands:
    Code:
    blockMesh
    rhoCentralFoam
  3. While the solver was still running (takes a while to run the whole case), I then edited the file "system/controlDict" and added the following line:
    Code:
    libs ("librhoCentralFoam.so");
  4. Still while the solver was still running, I ran:
    Code:
    wallHeatFlux
  5. And it did give me results, such as:
    Code:
    Time = 6.425e-08
    Selecting thermodynamics package 
    {
        type            hePsiThermo;
        mixture         pureMixture;
        transport       sutherland;
        thermo          hConst;
        equationOfState perfectGas;
        specie          specie;
        energy          sensibleInternalEnergy;
    }
    
    Reading/calculating face flux field phi
    
    Selecting turbulence model type laminar
    
    Wall heat fluxes [W]
    movingWall -9.86075e-07
    fixedWalls -2.44182e-07

edit: I went back and re-read your posts. So the problem was in visualizing the results. That's because you have to load the patches in ParaView, instead of the internal mesh, as shown in the attached image.

Best regards,
Bruno
Attached Images
File Type: jpg Screenshot from 2015-08-18 21:09:27.jpg (55.6 KB, 2 views)
__________________

Last edited by wyldckat; August 18, 2015 at 16:09. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   August 19, 2015, 13:23
Default
  #10
New Member
 
chariton christou
Join Date: Feb 2014
Posts: 26
Rep Power: 4
charitonas is on a distinguished road
Hi Bruno,

Thank you for your reply and for your time. I figure it out by editing the code and now its ok. However, i will try your suggestion as well.
charitonas is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use wallHeatFlux for incompressible problem? hswzzz OpenFOAM Post-Processing 1 April 14, 2015 06:25
Something doens't work with wallHeatFlux utility or externalWallHeatFluxTemperat BC!! zfaraday OpenFOAM Post-Processing 0 February 5, 2015 17:47
Modify rhoCentralFoam: other equations of state fivos OpenFOAM Programming & Development 0 January 16, 2015 16:31
problem with WallHeatFlux Roman1 OpenFOAM Running, Solving & CFD 1 January 24, 2014 11:31
rhoCentralFoam and wallHeatFlux RomW OpenFOAM Post-Processing 8 November 8, 2012 11:22


All times are GMT -4. The time now is 10:36.