|
[Sponsors] |
Building a solver with fixedTemperatureConstraint using fvOptions |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 29, 2013, 12:41 |
Building a solver with fixedTemperatureConstraint using fvOptions
|
#1 |
New Member
Join Date: Jul 2013
Posts: 6
Rep Power: 13 |
Dear Foamers,
I have been using OpenFOAM for several months for a student project. Everything has been working quite well. But at the moment I am a bit stuck at a problem. Maybe someone can help… For version 2.2.0 OpenFOAM seems to have introduced a very nice new feature of fvOptions called ‘fixedTemperatureConstraint’, to ‘to fix the temperature to a given value’ (see http://www.openfoam.org/version2.2.0/fvOptions.php). I would like to use this feature to set the temperature of air flowing through a heater to a fixed temperature instead of having to model the heater as a heat source. My input for the fvOptions file would look like this Code:
fixedTemperaure1 { type fixedTemperatureConstraint; active true; selectionMode cellZone; cellZone heater; fixedTemperatureConstraintCoeffs { mode uniform; temperature 350; } }
Code:
fvScalarMatrix TEqn ( fvm::div(phi, T) - fvm::laplacian(alphaEff, T) == fvOptions(T) ); TEqn.relax(); fvOptions.constrain(TEqn); TEqn.solve(); Compiling of the solver works fine. But when trying to run a case, I get the following error massage. Code:
--> FOAM FATAL ERROR: request for basicThermo thermophysicalProperties from objectRegistry region0 failed available objects of type basicThermo are 0 ( ) Is there a thermophysical model necessary for the implementation of the fixedTemperatureConstraint? If not, do you have any hints where the error messages might come from? Thank you very much for your help! - Fluido - Last edited by Fluido; August 1, 2013 at 05:37. |
|
July 30, 2013, 09:08 |
|
#2 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18 |
Hello,
My guess is you forget the "-I$(LIB_SRC)/fvOptions/lnInclude" in your Make/options file. regards, olivier |
|
July 30, 2013, 22:36 |
|
#3 |
New Member
Andre Weiner
Join Date: Aug 2012
Posts: 29
Rep Power: 14 |
Hey!
You have a simple transport equation for a scalar T, so you have to use the explicitSetValue fvOption. The fixedTemperatureConstraint is for energy equations. Check also the post of olivier about the wmake options. regards, Andre |
|
August 1, 2013, 05:20 |
|
#4 | |
New Member
Join Date: Jul 2013
Posts: 6
Rep Power: 13 |
Quote:
thank you for your idea! I checked the options file once again. The fvOptions entry is there. So, that's not the problem... Regards - Fluido - |
||
August 1, 2013, 05:36 |
|
#5 | |
New Member
Join Date: Jul 2013
Posts: 6
Rep Power: 13 |
Quote:
thank you for the info! If the fixedTemperatureConstraint is made for energy equations, the call for a thermophysical model makes sense somehow. Can I find this information somewhere inside OpenFOAM (without having to dig deep into the code) or somewhere else? I will try the explicitSetValue option now... Regards - Fluido - |
||
August 1, 2013, 05:41 |
|
#6 |
New Member
Join Date: Jul 2013
Posts: 6
Rep Power: 13 |
There was a little error in my original post. The error message does not appear when compiling, but when running a case with the compiled solver. So, compiling of the solver works, without any errors.
|
|
August 1, 2013, 06:21 |
|
#7 | |
New Member
Andre Weiner
Join Date: Aug 2012
Posts: 29
Rep Power: 14 |
Quote:
Code:
void Foam::fv::fixedTemperatureConstraint::setValue ( fvMatrix<scalar>& eqn, const label ) { const basicThermo& thermo = mesh_.lookupObject<basicThermo>("thermophysicalProperties"); if (eqn.psi().name() == thermo.he().name()) {... Regards, Andre |
||
August 1, 2013, 11:23 |
|
#8 | |
New Member
Join Date: Jul 2013
Posts: 6
Rep Power: 13 |
Quote:
Meanwhile I tried the explicitSetValue option. I just changed the input in the fvOptions file to: Code:
source1 { type scalarExplicitSetValue; active true; selectionMode cellZone; cellZone fluid-porous; scalarExplicitSetValueCoeffs { volumeMode absolute; injectionRate { T 323; } } } So, thank you again! - Fluido - |
||
February 14, 2014, 07:25 |
|
#9 |
Senior Member
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19 |
Dear All,
I am trying to do something like what you did, but instead of temperatures, I wanna add in a certain cellSet a constant bodyForce. Do you have an idea about I can do this? Thanks a lot, Samuele |
|
February 15, 2018, 01:30 |
|
#10 | |
Member
Ramana
Join Date: Jul 2017
Location: India
Posts: 58
Rep Power: 9 |
Quote:
any help is appreciated. Regards, s.v.Ramana |
||
Tags |
constraint, fixed temperature, fvoptions, sources, temperature source |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
thobois class engineTopoChangerMesh error | Peter_600 | OpenFOAM | 4 | August 2, 2014 10:52 |
How do I install a custom solver? | NJG | OpenFOAM Programming & Development | 5 | January 30, 2013 20:03 |
Interfoam blows on parallel run | danvica | OpenFOAM Running, Solving & CFD | 16 | December 22, 2012 03:09 |
Unexplained Error during Solver Runs | cfb | CFX | 6 | November 9, 2012 16:42 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 15:08 |