|
[Sponsors] |
November 18, 2015, 19:34 |
|
#41 |
New Member
Aly Taleb
Join Date: Aug 2015
Posts: 5
Rep Power: 11 |
Hi everybody,
What does one need to do if one wants the solver to update a temperature dependent Cp for every time step? I am running coldEngineFoam and it only calculates Cp through Janaf for the beginning of the run. After that Cp is constant although the temperature fluctuates. All the solutions are post processing. Cp is calculated at the end of the run depending on the temperature field. I want the temperature field to be coupled to the varying Cp. Thanks! |
|
November 19, 2015, 04:34 |
|
#42 | |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Quote:
taking a look to the code, you are using the energy equation of rhoSimpleFoam. Inside that file, you have thermo.correct(), which is updating Cp each time step. This is the thing you were asking for? Because it should change once your equation is solved. |
||
November 19, 2015, 16:20 |
|
#43 |
New Member
Aly Taleb
Join Date: Aug 2015
Posts: 5
Rep Power: 11 |
Thanks agustinvo. You are right. It does calculate an updated Cp value for every time step. For some reason, the output that I wrote for Cp only showed the value calculated at the beginning of the run and did not change it for the time steps.
I wrote the following in the createFields.H file: Code:
volScalarField heatCp ( IOobject ( "heatCp", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), thermo.Cp() ); Code:
heatCp { type cellSource; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl timeStep; outputInterval 1; log true; valueOutput false; source all; sourceName none; operation volAverage; fields ( heatCp ); } |
|
November 24, 2015, 11:30 |
|
#44 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Did you try to write in your code, just after the thermo.correct()
Code:
heatCp=thermo.Cp |
|
November 26, 2015, 07:59 |
|
#45 |
New Member
Aly Taleb
Join Date: Aug 2015
Posts: 5
Rep Power: 11 |
Thanks augustinvo. I've found a work-around for the problem. I tried your suggestion but it gives me an error. However, I don't need this solution any more
|
|
March 10, 2016, 10:56 |
|
#46 |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 11 |
Hi,
sorry to bump into this thread again. I would like to see the cp values after my simulation. I used wyldckats last code, but when I try to wmake it I gain this: Code:
Making dependency list for source file specificHeat.C could not open file cyclicAMILduInterface.H for source file specificHeat.C due to No such file or directory could not open file cyclicAMIPolyPatch.H for source file specificHeat.C due to No such file or directory SOURCE=specificHeat.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam240/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam240/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam240/src/OpenFOAM/lnInclude -I/opt/openfoam240/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/specificHeat.o In file included from /opt/openfoam240/src/finiteVolume/lnInclude/ddtScheme.C:30:0, from /opt/openfoam240/src/finiteVolume/lnInclude/ddtScheme.H:325, from /opt/openfoam240/src/finiteVolume/lnInclude/fvcDdt.C:28, from /opt/openfoam240/src/finiteVolume/lnInclude/fvcDdt.H:199, from /opt/openfoam240/src/finiteVolume/lnInclude/fvc.H:44, from /opt/openfoam240/src/finiteVolume/lnInclude/fvCFD.H:8, from specificHeat.C:27: /opt/openfoam240/src/finiteVolume/lnInclude/cyclicAMIFvPatch.H:39:35: fatal error: cyclicAMILduInterface.H: No such file or directory #include "cyclicAMILduInterface.H" ^ compilation terminated. make: *** [Make/linux64GccDPOpt/specificHeat.o] Error 1 If it is looking for it, but does not find it, is there maybe only a new place or name of cyclicAMILduInterface.H? Thank you. Best |
|
March 11, 2016, 10:56 |
|
#47 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Dear Georg,
What's wrong with the "Not implemented" problem as you posted? Could you tell us how to solve this problem? Best, Xu |
|
March 13, 2016, 12:48 |
|
#48 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answers/questions:
@Gerrit: Quote:
Anyway, see this post: http://www.cfd-online.com/Forums/ope...tml#post567796 - post #2 @wenxu: Quote:
__________________
|
|||
March 14, 2016, 04:34 |
|
#49 | |
Member
Join Date: Jul 2015
Location: Aalborg
Posts: 83
Rep Power: 11 |
Hi Bruno,
thank you very much for your reply! I refered to post #17, but this part of your answer solved my problem already! Quote:
|
||
April 15, 2017, 17:19 |
read Cp value from thermodynamics dictionary
|
#50 |
New Member
Join Date: Jan 2017
Posts: 5
Rep Power: 9 |
Dear Foamers, Using cHT solver, How can I get the Cp value from my thermophysicalProperties in constant/ into controlDict in system?
my thermophysicalProperties file looks like this: ... mixture { ... thermodynamics { Hf 0; Cp 12; } ... Is it possible to get it with a command like : const volScalarField& T = mesh_.lookupObject<volScalarField>("T"); that is used for temperature? Annoying is that I managed to access thermodynamics dictionary (dictionary that you can see above) but I don't know how to extract Cp value from it, is there any command that I can use for it? Last edited by mom; April 18, 2017 at 05:07. |
|
July 11, 2019, 08:54 |
cp coeffs
|
#51 |
New Member
TAKILT Hocine
Join Date: May 2019
Posts: 2
Rep Power: 0 |
hello all
can someone help me to see the cp of a fluid after the combustion air-H2 to be able to calculate gamma mass fraction: H2 = 1 H2O = 0.256 O2 = 0.258 N2 = 0.486 THANK YOU |
|
June 18, 2021, 08:19 |
Cp field for multiphase solvers
|
#52 |
Member
Join Date: Sep 2018
Location: France
Posts: 62
Rep Power: 8 |
Hi all !
I am trying to add the isobaric heat capacity in createFields.H to visualize it using the multiphase solver compressibleInterFoam. So I added the following lines on the createFields.H file : Code:
volScalarField Cp ( IOobject ( "Cp", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mixture.thermo1().Cp()()*alpha1 + mixture.thermo2().Cp()()*alpha2 ); I tried to follow the method suggested by wyldckat & gork by adding these following lines : Code:
autoPtr<rhoThermo> pThermo(rhoThermo::New(mesh)); rhoThermo& thermo = pThermo(); thermo.validate(args.executable(), "h", "e"); Actually, this message is normal as I declare the thermo package in separate thermophysicalProperties for each phase (for instance thermophysicalProperties.liquid and thermophysicalProperties.gas) So my question is how can I do to update the Cp by forcing the code to read into the right thermophysicalProperties files ? Cheers, |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TimeVaryingMappedFixedValue | irishdave | OpenFOAM Running, Solving & CFD | 32 | June 16, 2021 07:55 |
Numerical errors in nested domain with pre-calculated boundary values | Arnoldinho | OpenFOAM Running, Solving & CFD | 3 | April 4, 2012 11:31 |
max node values exceed max element values in contour plot | jason_t | FLUENT | 0 | August 19, 2009 12:32 |
exact face values | RubenG | Main CFD Forum | 0 | June 22, 2009 12:09 |
strange node values @ solid/fluid interface - help | JB | FLUENT | 2 | November 1, 2008 13:04 |