CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

rhoPimpleFoam & fvOptions - defined but not applied

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By RobertHB

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 19, 2019, 03:09
Default rhoPimpleFoam & fvOptions - defined but not applied
  #1
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
Hi All
I am running a simulation around a heating element.
I have a container i would like to see the effect of inlet velocity and outlet placement on the internal temperature of the air. I have a heating element whose temperature i fix with fvOptions. I apply the cellset through topoSet so that i can adjust its location easily.


Code:
heatSource
{
    type scalarFixedValueConstraint;
    active true;
    selectionMode cellSet;
    cellSet heater;
    fieldValues
    {
        T 400;
    }
    scalarFixedValueConstrainteCoeffs
    {


     selectionMode cellSet;
     
    }
}
I am using the following thermophysicalProperties
Code:
thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       sutherland;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        molWeight   28.9;
    }
    thermodynamics
    {
        Cp          1007;
        Hf          0;
    }
    transport
    {
        As          1.4792e-06;
        Ts          116;
    }
}
the code runs but i get the following warning:
Quote:
--> FOAM Warning :
From function virtual void Foam::fv:ption::checkApplied() const
in file cfdTools/general/fvOptions/fvOption.C at line 125
Source heatSource defined for field T but never used
I am guessing that when i solve for "e" my T field in the 0 folder gets included.
Quote:
smoothSolver: Solving for e, Initial residual = 1, Final residual = 0.0172392, No Iterations 2
I am however lost on how to include a cellSet/cellZone of fixed temperature into the solver using fvOptions. should i be applying a h or e value instead of T?
bullmut is offline   Reply With Quote

Old   February 19, 2019, 04:07
Default
  #2
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Quote:
Originally Posted by bullmut View Post
Code:
heatSource
{
    type scalarFixedValueConstraint;
    active true;
    selectionMode cellSet;
    cellSet heater;
    fieldValues
    {
        T 400;
    }
    scalarFixedValueConstrainteCoeffs
    {


     selectionMode cellSet;
     
    }
}
I am guessing that when i solve for "e" my T field in the 0 folder gets included.

I am however lost on how to include a cellSet/cellZone of fixed temperature into the solver using fvOptions. should i be applying a h or e value instead of T?

Your fvOptions term applies to the variable "T". If you don't have a T variable in your 0/ folder or your solver does not use the T variable from your 0/ folder your fvOptions term does not apply.

I just did a quick look-over of the rhoPimpleFoam files and it does not seem to use the T variable.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   February 19, 2019, 04:15
Default
  #3
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
Hi Robert
Thanks for the reply
I am using the angledDuct case as my base.
It uses a T field in the 0 folder.


Quote:
tutorials/compressible/rhoPimpleFoam/RAS/angledDuct:
├── 0
│ ├── alphat
│ ├── epsilon
│ ├── k
│ ├── nut
│ ├── p
│ ├── T
│ └── U
├── Allrun
├── constant
│ ├── fvOptions
│ ├── thermophysicalProperties
│ └── turbulenceProperties
└── system
├── blockMeshDict.m4
├── controlDict
├── fvSchemes
└── fvSolution

Which confuses me. I assume T would be included in the rhoPimpleFoma solver but when i looked at he .C file i did not see it.
bullmut is offline   Reply With Quote

Old   February 19, 2019, 06:07
Default
  #4
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12
RobertHB is on a distinguished road
Quote:
If we select the hePsiThermo thermophysical model, the temperature field T is calculated from the solved energy variable in the following function [...] The above function calculate() is called by rhoPimpleFoam, rhoSimpleFoam and sonicFoam etc. from the line “thermo.correct()” after solving the energy conservation equation EEqn
Source: http://caefn.com/openfoam/temperature-calculation

Have a look for yourself but i would think that the T file is included to provide BC's and not the variable itself. Thus it does not include the fvOptions term. But i don't work with your solver or anything temperature related. So i might be wrong afterall.
bullmut likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   February 19, 2019, 07:45
Default
  #5
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
Yeah, i saw this post before.

Which makes me think i need to specify enthalpy (h) and not temperature in fvOptions


Quote:
I am however lost on how to include a cellSet/cellZone of fixed temperature into the solver using fvOptions. should i be applying a h or e value instead of T?

Will try the enthalpy approach and let you know
bullmut is offline   Reply With Quote

Old   February 19, 2019, 20:40
Default
  #6
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 14
clapointe is on a distinguished road
What you're probably looking for is fixedTemperatureConstraint. I've not tested it myself for rhoPimpleFoam, but it is used here (https://github.com/OpenFOAM/OpenFOAM...tant/fvOptions) for a rhoSimpleFoam tutorial so there's no reason it shouldn't work.

Caelan
clapointe is offline   Reply With Quote

Old   April 11, 2019, 10:55
Default
  #7
Member
 
Gareth
Join Date: Jun 2010
Posts: 56
Rep Power: 15
bullmut is on a distinguished road
Hi All


Thanks for the info and help.
I ended up using an stl (since the heater is a simple box) and then with snappy i assigned a patch name. this name was then use in the T file of my 0 folder to set the temperature.


Allowed me to move my heater around easy enough and meant i could set the temperature directly.


Cheers
bullmut is offline   Reply With Quote

Reply

Tags
fvoptions, heat transfer, rhopimplefoam


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
Can I use fvOptions to couple a solid region and a fluid region? titanchao OpenFOAM Running, Solving & CFD 4 January 14, 2022 07:55
Adding fvOptions to turbulence model slottedLemon OpenFOAM Programming & Development 13 May 28, 2020 12:27
New output variable for source term in fvoptions - without changing the solver vincent.clary OpenFOAM Programming & Development 2 June 26, 2018 05:21
Transient User Defined Function in CFX Niru CFX 0 November 12, 2013 17:07
What type is defined as the interfaces between stator and stator on OF-2.1.1? renyun0511 OpenFOAM Running, Solving & CFD 3 May 18, 2013 08:11


All times are GMT -4. The time now is 18:31.