|
[Sponsors] |
August 27, 2013, 17:50 |
Mach number in openFOAM
|
#1 |
Senior Member
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15 |
Dear all,
i have done a RANS simulation using KWSST model with temperature. now i want to see the mach fields around my aircraft so, when i type Mach its asking for thermophysicalProperties ? so has any body used the Mach function in openFOAM and how does this work what is this thermophysicalproperties ? i dunno what are the values within that mean. it will be very helpful if someone tells me what is happening Thanks, Hasan. |
|
August 28, 2013, 04:08 |
|
#2 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
which solver do you use?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 28, 2013, 04:11 |
|
#3 |
Senior Member
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15 |
boutantboussiqsimplefoam
please temme if i have to use some thing else.. |
|
August 28, 2013, 04:58 |
|
#4 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
I haven't used this solver,tell me whats your case to run exactly.
and put the error you get.but it seems that a field that is needed for Mach utility isn't there in time folders. what files are there in your time folders?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 28, 2013, 13:07 |
|
#5 |
Senior Member
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15 |
K, Kappat, Nut, T, P, P_rgh, Omega, U
and i want to know what are the things that is gonna be there in the thermodynamics properties ! folder and how do i find these things that i need for mach when i put R 287; Cp 1005; Cv 716; Hf 0; (i dunno whats Hf) just got from some where !! don rem where do i need it ? its saying unknown value for 287 just what should be there on thermodynamics properties i wanna know Thanks for your time Hasan K.J. |
|
August 28, 2013, 15:22 |
|
#6 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
its Mach utility code.send your case to have a look into it if you could.
Code:
Application Mach Description Calculates and optionally writes the local Mach number from the velocity field U at each time. The -nowrite option just outputs the max value without writing the field. \*---------------------------------------------------------------------------*/ #include "calc.H" #include "fluidThermo.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) { bool writeResults = !args.optionFound("noWrite"); IOobject Uheader ( "U", runTime.timeName(), mesh, IOobject::MUST_READ ); IOobject Theader ( "T", runTime.timeName(), mesh, IOobject::MUST_READ ); // Check U and T exists if (Uheader.headerOk() && Theader.headerOk()) { autoPtr<volScalarField> MachPtr; volVectorField U(Uheader, mesh); if ( IOobject ( "thermophysicalProperties", runTime.constant(), mesh ).headerOk() ) { // thermophysical Mach autoPtr<fluidThermo> thermo ( fluidThermo::New(mesh) ); volScalarField Cp(thermo->Cp()); volScalarField Cv(thermo->Cv()); MachPtr.set ( new volScalarField ( IOobject ( "Ma", runTime.timeName(), mesh ), mag(U)/(sqrt((Cp/Cv)*(Cp - Cv)*thermo->T())) ) ); } else { // thermodynamic Mach IOdictionary thermoProps ( IOobject ( "thermodynamicProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); dimensionedScalar R(thermoProps.lookup("R")); dimensionedScalar Cv(thermoProps.lookup("Cv")); volScalarField T(Theader, mesh); MachPtr.set ( new volScalarField ( IOobject ( "Ma", runTime.timeName(), mesh ), mag(U)/(sqrt(((Cv + R)/Cv)*R*T)) ) ); } Info<< "Mach max : " << max(MachPtr()).value() << endl; if (writeResults) { MachPtr().write(); } } else { Info<< " Missing U or T" << endl; } Info<< "\nEnd\n" << endl; } // ************************************************************************* //
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
August 28, 2013, 15:37 |
|
#7 |
Senior Member
Hasan K.J.
Join Date: Dec 2011
Location: Bristol, United Kingdom
Posts: 200
Rep Power: 15 |
R R [0 -2 2 0 0 ] 287;
Cp Cp [0 -2 2 0 0 ] 1005; Cv Cv [0 -2 2 0 0 ] 716; Hf Hf [0 0 0 0 0 ]; this one is not needed.... supposedly lol.. dint know where i even got that from I just kept playing around and it worked... with the above values, thanks for your initiative to help - i have small Question what does this [0 -2 2 0 0 ] mean..? when i Put [0 0 0 0 0] for all it dint work by some shear luck i copy pasted something and it worked, i know there are called dimensions are some thing can u please explain if u know what it is, coz i have sorted out the problem by luck i wanna know what it is Thanks |
|
August 28, 2013, 16:22 |
|
#8 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
Hi
see about dimensions in guide in doc folder of OpenFOAM.there its explained.in some solvers you should add dimensions too.I haven't worked with the solver you said.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] Mesh Refinement | Luiz Eduardo Bittencourt Sampaio (Sampaio) | OpenFOAM Meshing & Mesh Conversion | 42 | January 8, 2017 12:55 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 05:36 |
Stable boundaries | marcoymarc | CFX | 33 | March 13, 2013 06:39 |
Unaligned accesses on IA64 | andre | OpenFOAM | 5 | June 23, 2008 10:37 |