|
[Sponsors] |
March 27, 2013, 20:01 |
how can see Cp values?
|
#1 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
i use janaf for Cp(isobaric speciefic heat).then does anyone know the keyword for puting Cp's in each time step?(like the command Mach for mach number
Last edited by immortality; March 27, 2013 at 20:39. |
|
March 28, 2013, 08:52 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
any suggestion?nobody knows?!!
|
|
March 28, 2013, 14:16 |
|
#3 |
Member
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 14 |
If you look at the code for mach you'll see that it has to call Cp to calculate the mach number, you can mimic the code outputting the mach number to output Cp as well using the same call. This would be to extract the Cp values post simulation.
You could also do it while the solver is running by defining an I/O field that simply gains the value of Cp for each timestep and set it to autowrite. Depending on how your thermo package is defined in the solver you intend on using thermo.Cp() might work, I think, just writing from the top of my head right now. At any rate Cp will come from the same call that pulls temperature, pressure, rho, etc. |
|
March 28, 2013, 15:35 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thank you for your guidance.
I've added this to creatFields.H: Code:
volScalarField Cp ( IOobject ( "Cp", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), thermo.Cp() ); but it isn't written in each folder. |
|
March 29, 2013, 00:57 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
why it is not written in time folders in your opinion?
|
|
March 29, 2013, 09:02 |
|
#6 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
any help or suggestion?
|
|
March 30, 2013, 05:31 |
|
#7 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
is it not possible to have Cp values in folders?
|
|
March 31, 2013, 07:11 |
HOW to write Cp in time folders during or after the run?
|
#8 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I've added this to creatFields.H:
Code:
volScalarField Cp ( IOobject ( "Cp", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), thermo.Cp() ); but it isn't written in each folder. |
|
April 1, 2013, 05:10 |
|
#9 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
why it doesn't work?
|
|
April 1, 2013, 15:18 |
|
#10 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Ehsan: try the attached package "specificHeat.tar.gz". To build it: Code:
tar -xzf specificHeat.tar.gz cd specificHeat wmake Since I don't know which tutorial case I should test on, I tried "heatTransfer/buoyantSimpleFoam/buoyantCavity" and it worked... with limited success. In essence, the "Cp" value was constant on the whole field. edit: forgot to mention that to use it, you need to run: Code:
specificHeat Without knowing more information about a test case I can use, I suggest that you also try the function object "writeRegisteredObject": http://openfoamwiki.net/index.php/Ti...gisteredObject Best regards, Bruno
__________________
Last edited by wyldckat; April 1, 2013 at 15:20. Reason: see "edit:" |
|
April 1, 2013, 16:24 |
|
#11 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thank you dear Bruno.since i use OF 2.2.0 recently.it got some eerors on basicPsiThermo that has changed its name into only psiThermo.when i changed all basicPsiThermo to psiThermo this error dispalyed in compiling.
Code:
ehsan@Ehsan-com:~/Desktop/specificHeat$ wmake g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/finiteVolume/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -Xlinker --add-needed -Xlinker --no-as-needed Make/linux64GccDPOpt/specificHeat.o -L/opt/openfoam220/platforms/linux64GccDPOpt/lib \ -lmeshTools -lbasicThermophysicalModels -lspecie -lfiniteVolume -lgenericPatchFields -lOpenFOAM -ldl -lm -o /home/ehsan/OpenFOAM/ehsan-2.2.0/platforms/linux64GccDPOpt/bin/specificHeat /usr/bin/ld: cannot find -lbasicThermophysicalModels collect2: ld returned 1 exit status make: *** [/home/ehsan/OpenFOAM/ehsan-2.2.0/platforms/linux64GccDPOpt/bin/specificHeat] Error 1 |
|
April 1, 2013, 18:31 |
|
#12 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
I was hoping you would figure it out how to upgrade it Attached is the version that compiles and seems to work in OpenFOAM 2.2... at least until I've got a better test case... Best regards, Bruno
__________________
|
|
April 2, 2013, 09:04 |
|
#13 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thank you dear Bruno very much.if this error resolve the difficulty is passed.should i only change rhoThermo to psiThermo in specificHeat?
Code:
Create time Create mesh for time = 0 Reading thermophysical properties Selecting thermodynamics package { type hePsiThermo; mixture pureMixture; transport sutherland; thermo janaf; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } --> FOAM FATAL ERROR: Unknown rhoThermo type thermoType { type hePsiThermo; mixture pureMixture; transport sutherland; thermo janaf; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } Valid rhoThermo types are: type mixture transport thermo equationOfState specie energy heRhoThermo homogeneousMixture const hConst incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo homogeneousMixture const hConst perfectGas specie sensibleEnthalpy heRhoThermo homogeneousMixture sutherland janaf incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo homogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy heRhoThermo inhomogeneousMixture const hConst incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo inhomogeneousMixture const hConst perfectGas specie sensibleEnthalpy heRhoThermo inhomogeneousMixture sutherland janaf incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo inhomogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy heRhoThermo multiComponentMixture const hConst incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo multiComponentMixture const hConst perfectGas specie sensibleEnthalpy heRhoThermo multiComponentMixture polynomial hPolynomial icoPolynomial specie sensibleEnthalpy heRhoThermo multiComponentMixture sutherland janaf incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo multiComponentMixture sutherland janaf perfectGas specie sensibleEnthalpy heRhoThermo pureMixture const hConst incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo pureMixture const hConst incompressiblePerfectGas specie sensibleInternalEnergy heRhoThermo pureMixture const hConst perfectFluid specie sensibleEnthalpy heRhoThermo pureMixture const hConst perfectFluid specie sensibleInternalEnergy heRhoThermo pureMixture const hConst perfectGas specie sensibleEnthalpy heRhoThermo pureMixture const hConst perfectGas specie sensibleInternalEnergy heRhoThermo pureMixture const hConst rhoConst specie sensibleEnthalpy heRhoThermo pureMixture const hConst rhoConst specie sensibleInternalEnergy heRhoThermo pureMixture polynomial hPolynomial icoPolynomial specie sensibleEnthalpy heRhoThermo pureMixture polynomial hPolynomial icoPolynomial specie sensibleInternalEnergy heRhoThermo pureMixture sutherland hConst incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo pureMixture sutherland hConst incompressiblePerfectGas specie sensibleInternalEnergy heRhoThermo pureMixture sutherland hConst perfectGas specie sensibleEnthalpy heRhoThermo pureMixture sutherland hConst perfectGas specie sensibleInternalEnergy heRhoThermo pureMixture sutherland janaf incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo pureMixture sutherland janaf incompressiblePerfectGas specie sensibleInternalEnergy heRhoThermo pureMixture sutherland janaf perfectGas specie sensibleEnthalpy heRhoThermo pureMixture sutherland janaf perfectGas specie sensibleInternalEnergy heRhoThermo reactingMixture const hConst incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo reactingMixture const hConst perfectGas specie sensibleEnthalpy heRhoThermo reactingMixture polynomial hPolynomial icoPolynomial specie sensibleEnthalpy heRhoThermo reactingMixture sutherland janaf incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo reactingMixture sutherland janaf perfectGas specie sensibleEnthalpy heRhoThermo singleStepReactingMixture sutherland janaf perfectGas specie sensibleEnthalpy heRhoThermo veryInhomogeneousMixture const hConst incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo veryInhomogeneousMixture const hConst perfectGas specie sensibleEnthalpy heRhoThermo veryInhomogeneousMixture sutherland janaf incompressiblePerfectGas specie sensibleEnthalpy heRhoThermo veryInhomogeneousMixture sutherland janaf perfectGas specie sensibleEnthalpy From function rhoThermo::New in file lnInclude/basicThermoTemplates.C at line 73. FOAM exiting |
|
April 2, 2013, 16:40 |
|
#14 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
I need a test case. Without one, I don't know what should be the correct choice to make Because as I said on a previous post, I used the tutorial "heatTransfer/buoyantSimpleFoam/buoyantCavity" to test the attached application. It worked with that tutorial, but there are more solvers that use thermodynamics in different ways. Best regards, Bruno
__________________
|
|
April 2, 2013, 19:19 |
|
#15 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
dear Bruno my case is like shock tube but in rhoPimpleFoam(there is not a tutorial case in rhoPimpleFoam).could you please test for my case if i send to you.
Thank you very much. |
|
April 3, 2013, 18:22 |
|
#16 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
dear Bruno could you see my case to modify Cp function?
could it be changed to calculate 1)mass flow rate on patches and also 2)total mass inflow and outflow measuring by a function like this? thank you very very much. |
|
April 3, 2013, 20:07 |
|
#17 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
For calculating mass flow, the following has been around for several years now: http://openfoamwiki.net/index.php/Contrib_calcMassFlow As for the specificHeat utility: I'm glad you provided a test case, because now I've managed to figure out that Cp was not correctly updated with each time step. The attached version specificHeatHePsi (for OpenFOAM 2.2) is based on wdot and rhoPimpleFoam. It updates (by force) the thermo variable and writes the updated "Cp" field for all time steps. Keeping in mind that this new utility is named specificHeatHePsi. Best regards, Bruno
__________________
|
|
April 4, 2013, 08:55 |
|
#18 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Thank you very much dear Bruno.now it works well.
the mass flow application gives an error when compiled: Code:
ehsan@Ehsan-com:~/Desktop/calcMassFlow$ wmake Making dependency list for source file calcMassFlow.C could not open file fvCFD.H for source file calcMassFlow.C could not open file FaceSetUtilities.H for source file calcMassFlow.C SOURCE=calcMassFlow.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/cfdTools/lnInclude -I/opt/openfoam220/src/cfdTools/general/lnInclude -I/opt/openfoam220/src/meshTools/lnInclude -I/home/ehsan/OpenFOAM/ehsan-2.2.0/Libraries/cellFaceSetUtilities/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/calcMassFlow.o calcMassFlow.C:33:19: fatal error: fvCFD.H: No such file or directory compilation terminated. make: *** [Make/linux64GccDPOpt/calcMassFlow.o] Error 1 I have done the run and now i want to calculate mass flow.how to do it like Cp after end of simulation?can modify Cp tool or anything like this? thank you very much dear Bruno. |
|
April 6, 2013, 08:20 |
|
#19 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
It's possible to merge the two applications, since the source code is fully open. Nonetheless, I don't have to time to look into such a feature. And since you have about 2 threads on the topic of mass flow:
Best regards, Bruno
__________________
|
|
April 6, 2013, 12:33 |
|
#20 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thanks Bruno.but i don't know how to use funkyDoCalc now.
what dictionary i have to add in system folder? calcMassFlow is very nice.but it very good ta modify it a bit more. thank you again. |
|
|
|
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 |