how can see Cp values?
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
|
any suggestion?nobody knows?!!
|
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. |
thank you for your guidance.
I've added this to creatFields.H: Code:
volScalarField Cp but it isn't written in each folder. |
why it is not written in time folders in your opinion?
|
any help or suggestion?:(
|
is it not possible to have Cp values in folders?
|
HOW to write Cp in time folders during or after the run?
I've added this to creatFields.H:
Code:
volScalarField Cp but it isn't written in each folder. |
why it doesn't work?
|
1 Attachment(s)
Greetings to all!
@Ehsan: try the attached package "specificHeat.tar.gz". To build it: Code:
tar -xzf specificHeat.tar.gz 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 |
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 |
1 Attachment(s)
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 |
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 |
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 |
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. |
1 Attachment(s)
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. |
1 Attachment(s)
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 |
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 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. |
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 |
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. |
All times are GMT -4. The time now is 15:20. |