|
[Sponsors] |
April 7, 2013, 11:59 |
|
#21 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
About funkyDoCalc - answered here: http://www.cfd-online.com/Forums/ope...tml#post418889
__________________
|
|
April 9, 2013, 07:14 |
|
#22 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
dear Bruno thank you.the Cp tool seems to work nice and the problem is resolved well.
Then this topic is closed for futurers now and will be opened if anyone has a question. |
|
April 19, 2013, 15:05 |
|
#23 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I have to ask another question about Cp.
how can I add the field of Cp in the solver?(I want to use that in calculating total pressure) thanks. |
|
April 19, 2013, 17:09 |
|
#24 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
In essence, the same way as these two tutorials:
Have fun! Best regards, Bruno
__________________
|
|
April 20, 2013, 15:49 |
|
#25 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
thank you.I read them carefully.very suitable.
but Cp is a field that I think should be calculated by the solver itself.but it is not in creatFields.H I had added Cp in createFields.H without any success before. I think I can calculate total pressure without any need to Cp from the formula0=p+1/2*rho*sqr(U) instead of isentropic relation.because the difference is so little.but how to do this? add this in solver or can obtain it on inlet and outlet patches like p by (I prefer swak4Foam because it calculates values in each time step not only in writing times) postProcessing functions? |
|
June 25, 2013, 11:04 |
|
#26 |
New Member
Georg Brösigke
Join Date: Nov 2012
Posts: 6
Rep Power: 14 |
Dear Fomers,
I am having issues on the same topic. I need to write out either the Cp or kappa field. As far as I understand, there are 3 possibilities: 1) changing the filed definition from NO_WRITE to MUST_WRITE? 2) using a post-processing utility? 3) using the writeRegisteredObject function in controlDict I am using a MultiRegionSolver based on chtMultiRegionFoam in OF 2.2.0 with thermoType { type heRhoThermo; mixture multiComponentMixture; transport polynomial; thermo janaf; equationOfState perfectGas; specie specie; energy sensibleEnthalpy; } I did not get one of the possible ways working: 1) I did not find where Cp or kappa fields are created and where to manage the output 2) I tried to combine the specificHeat utility presented by wyldckat with the wallHeatFlux utility in order to cope with MultiRegions. Ends up with the error: HTML Code:
Not Implemented Trying to construct an genericFvPatchField on patch SphereFront_Gas of field h From function genericFvPatchField<Type>::genericFvPatchField(const fvPatch& p, const DimensionedField<Type, volMesh>& iF) in file genericFvPatchField/genericFvPatchField.C at line 44. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::error::abort() in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 Foam::genericFvPatchField<double>::genericFvPatchField(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libgenericPatchFields.so" #3 Foam::fvPatchField<double>::addpatchConstructorToTable<Foam::genericFvPatchField<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/opt/openfoam220/platforms/linux64GccDPOpt/lib/libgenericPatchFields.so" #4 Foam::fvPatchField<double>::New(Foam::word const&, Foam::word const&, Foam::fvPatch const&, Foam::DimensionedField<double, Foam::volMesh> const&) in "/home/broesigk/OpenFOAM/broesigk-2.2.0/platforms/linux64GccDPOpt/lib/libMyFluidThermophysicalModels.so" #5 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricBoundaryField(Foam::fvBoundaryMesh const&, Foam::DimensionedField<double, Foam::volMesh> const&, Foam::List<Foam::word> const&, Foam::List<Foam::word> const&) in "/home/broesigk/OpenFOAM/broesigk-2.2.0/platforms/linux64GccDPOpt/lib/libMyFluidThermophysicalModels.so" #6 at rhoReactionThermos.C:0 #7 Foam::heThermo<Foam::rhoReactionThermo, Foam::SpecieMixture<Foam::multiComponentMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>, 8> > > >::heThermo(Foam::fvMesh const&, Foam::word const&) in "/home/broesigk/OpenFOAM/broesigk-2.2.0/platforms/linux64GccDPOpt/lib/libMyReactionThermophysicalModels.so" #8 Foam::rhoThermo::addfvMeshConstructorToTable<Foam::heRhoThermo<Foam::rhoReactionThermo, Foam::SpecieMixture<Foam::multiComponentMixture<Foam::polynomialTransport<Foam::species::thermo<Foam::janafThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleEnthalpy>, 8> > > > >::New(Foam::fvMesh const&, Foam::word const&) in "/home/broesigk/OpenFOAM/broesigk-2.2.0/platforms/linux64GccDPOpt/lib/libMyReactionThermophysicalModels.so" #9 Foam::autoPtr<Foam::rhoThermo> Foam::basicThermo::New<Foam::rhoThermo>(Foam::fvMesh const&, Foam::word const&) in "/home/broesigk/OpenFOAM/broesigk-2.2.0/platforms/linux64GccDPOpt/lib/libMyFluidThermophysicalModels.so" #10 Foam::rhoThermo::New(Foam::fvMesh const&, Foam::word const&) in "/home/broesigk/OpenFOAM/broesigk-2.2.0/platforms/linux64GccDPOpt/lib/libMyFluidThermophysicalModels.so" #11 in "/home/broesigk/OpenFOAM/broesigk-2.2.0/platforms/linux64GccDPOpt/bin/specificHeat" #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 in "/home/broesigk/OpenFOAM/broesigk-2.2.0/platforms/linux64GccDPOpt/bin/specificHeat" Aborted (core dumped) I would prefer having a solution for 2) but would appreciate any hints regards Georg Last edited by gork; June 25, 2013 at 12:29. |
|
June 27, 2013, 03:52 |
|
#27 | |
New Member
Georg Brösigke
Join Date: Nov 2012
Posts: 6
Rep Power: 14 |
Quote:
|
||
October 4, 2013, 09:46 |
|
#28 |
New Member
Peter Bishop
Join Date: Jan 2012
Posts: 20
Rep Power: 14 |
Hi,
I downloaded and compiled specificHeat utility and it worked like a charm! Now I'm tryin to extend it to reactingMixture, I want to calculate Cp as posprocessing of reactingFoam solution. Any help would be appreciated! Thanks |
|
October 5, 2013, 02:32 |
|
#29 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Peter,
Quote:
Best regards, Bruno
__________________
|
||
November 18, 2013, 15:57 |
|
#30 | |
Senior Member
|
Quote:
I guess, some users would be happy if you explained in a few sentences how you solved the problem. ;-) |
||
November 26, 2013, 03:37 |
|
#31 | |
New Member
Georg Brösigke
Join Date: Nov 2012
Posts: 6
Rep Power: 14 |
Quote:
sorry for taking a bit time to answer, I had to have a look at the files again... In the end I managed to get the post processing utility presented by Bruno working for my multi region case. If I remember correctly it was the wallFvPatch.H that was missing when I posted my error - it just had to be included as well (like in the wallHeatFlux untility) regards, Georg |
||
June 16, 2015, 07:03 |
|
#32 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hi again!
when I want to run the modified rhoCentralFoam for OF 2.4.0 it complains about unknown dimension of Cv and also Cp while it was running good before in 2.2.2 version. this is the warning: Code:
--> FOAM Warning : From function Foam::expressionField::read(const dictionary& dict) in file expressionField.C at line 130 No entry 'dimension' in "/home/ehsan/OpenFoam/kOmegaSST-WR/system/controlDict.functions.CvField" for field CRRv Not resetting the dimensions of the field Creating expression field CRRv ...[0] swak4Foam: Allocating new repository for sampledMeshes [1] swak4Foam: Allocating new repository for sampledMeshes [2] swak4Foam: Allocating new repository for sampledMeshes [3] swak4Foam: Allocating new repository for sampledMeshes [0] swak4Foam: Allocating new repository for sampledGlobalVariables [1] swak4Foam: Allocating new repository for sampledGlobalVariables [3] swak4Foam: Allocating new repository for sampledGlobalVariables [2] swak4Foam: Allocating new repository for sampledGlobalVariables Code:
CvField { type expressionField; autowrite false;//false; outputControl timeStep; outputInterval 1; expression "thermo_Cv()"; fieldName CRRv; } CpField { type expressionField; autowrite false;//false; outputControl timeStep; outputInterval 1; expression "thermo_Cp()"; fieldName CRRp; } thank you very much.
__________________
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. |
|
June 17, 2015, 16:23 |
|
#33 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Googled:
Code:
swak4Foam expressionField |
|
August 13, 2015, 05:13 |
|
#34 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hello to everyone,
what's wrong about Cp and Cv fields need to be used in the equations of the case? it shows the error bellow. Code:
ehsan@ehsan-N56JK:~/OpenFoam_Cases/kOmegaSST-WR$ rhoCentralFoam /*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 2.4.0-dcea1e13ff76 Exec : rhoCentralFoam Date : Aug 13 2015 Time : 12:35:32 Host : "ehsan-N56JK" PID : 2709 Case : /home/ehsan/OpenFoam_Cases/kOmegaSST-WR nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring run-time modified files using timeStampMaster allowSystemOperations : Allowing user-supplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // 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; } Reading field U Creating turbulence model Selecting turbulence model type RASModel Selecting RAS turbulence model kOmegaSST kOmegaSSTCoeffs { alphaK1 0.85034; alphaK2 1; alphaOmega1 0.5; alphaOmega2 0.85616; gamma1 0.5532; gamma2 0.4403; beta1 0.075; beta2 0.0828; betaStar 0.09; a1 0.31; c1 10; Cmu 0.09; Prt 1; b1 1; F3 false; } fluxScheme: Kurganov Starting time loop Mean and max Courant Numbers = 0.0284841995776 0.0869432167197 deltaT = 1.19047619048e-08 Time = 1.1904762e-08 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0 swak4Foam: Allocating new repository for sampledGlobalVariables --> FOAM Warning : From function ConcretePluginFunction<DriverType>::exists in file lnInclude/ConcretePluginFunction.C at line 121 Constructor table of plugin functions for PatchValueExpressionDriver is not initialized --> FOAM FATAL ERROR: Parser Error for driver PatchValueExpressionDriver at "1.1-4" :"field CRRp not existing or of wrong type" "CRRp/CRRv" ^^^^ --| Context of the error: - From dictionary: /home/ehsan/OpenFoam_Cases/kOmegaSST-WR/0/U.boundaryField.right Evaluating expression "CRRp/CRRv" From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 1189. FOAM exiting Code:
CvField { type expressionField; dimension [0 2 -2 -1 0 0 0]; autowrite false;//false; outputControl timeStep; outputInterval 1; expression "thermo_Cv()"; fieldName CRRv; } CpField { type expressionField; dimension [0 2 -2 -1 0 0 0]; autowrite false;//false; outputControl timeStep; outputInterval 1; expression "thermo_Cp()"; fieldName CRRp; }
__________________
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 13, 2015, 10:30 |
|
#35 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Quick answer: Sorry, I don't have enough time to develop a case myself for diagnosing this right now, but the problem seems to be due to the function object not running before the first time step. If the function object had ran before the first time step, then the object should have been registered.
Although I have the vague idea I've seen this error before... was a function object of type "readFields" in the function object list you had in the original case? |
|
August 13, 2015, 12:18 |
|
#36 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
this is the function object that I use in controlDict that isn't of type readFields. now I don't have any function object of that type.
Code:
writeMissingFields { type writeRegisteredObject; functionObjectLibs ( "libIOFunctionObjects.so" ); objectNames ("phi" "Cp" "Cv"); outputControl outputTime; }
__________________
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 13, 2015, 12:57 |
|
#37 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
I knew this looked familiar to me:
edit: I found this by Googling: Code:
site:cfd-online.com "wyldckat" "Cv" Last edited by wyldckat; August 13, 2015 at 12:58. Reason: see "edit:" |
|
August 14, 2015, 12:23 |
|
#38 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hi everyone,
although the run had been done correctly, now that I want to run again in of 2.4.0 and new swak4Foam, it shows errors on Cp and Cv fields, I tried to examine various combinations of "thermo:Cv", "thermo_Cv()", "CRRv" and with and without aliases with no success. for example if I use CRRv as below: Code:
CvField { type expressionField; dimensions [0 2 -2 -1 0 0 0]; autowrite false;//false; outputControl timeStep; outputInterval 1; aliases { thermo:Cv myCv; } expression "thermo:Cv"; fieldName CRRv; } Code:
Creating expression field CRRv ...swak4Foam: Allocating new repository for sampledMeshes swak4Foam: Allocating new repository for sampledGlobalVariables "Loaded plugin functions for 'FieldValueExpressionDriver':" rhoTurb_R: "volSymmTensorField rhoTurb_R()" rhoTurb_alphaEff: "volScalarField rhoTurb_alphaEff()" rhoTurb_devRhoReff: "volSymmTensorField rhoTurb_devRhoReff()" rhoTurb_epsilon: "volScalarField rhoTurb_epsilon()" rhoTurb_k: "volScalarField rhoTurb_k()" rhoTurb_muEff: "volScalarField rhoTurb_muEff()" rhoTurb_mut: "volScalarField rhoTurb_mut()" thermo_Cp: "volScalarField thermo_Cp()" thermo_Cv: "volScalarField thermo_Cv()" thermo_T: "volScalarField thermo_T()" thermo_alpha: "volScalarField thermo_alpha()" thermo_hc: "volScalarField thermo_hc()" thermo_he: "volScalarField thermo_he()" thermo_mu: "volScalarField thermo_mu()" thermo_p: "volScalarField thermo_p()" thermo_psi: "volScalarField thermo_psi()" thermo_rho: "volScalarField thermo_rho()" --> FOAM FATAL ERROR: Parser Error for driver FieldValueExpressionDriver at "1.1-6" :"field thermo not existing or of wrong type" "thermo:Cv" ^^^^^^ --| Context of the error: - Driver constructed from scratch Evaluating expression "thermo:Cv" From function parsingValue in file lnInclude/CommonValueExpressionDriverI.H at line 1189. FOAM exiting
__________________
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 14, 2015, 15:58 |
|
#39 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Fortunately you sent me the case via email, otherwise we would be playing "guess why this happens" for several more days... Instead, it took me... maybe 15 minutes to fix the problems? Well, I'm assuming the issues are fixed in the case I sent you, because it takes a very long time to run the solver and I'm also not certain what the results should be . But OK, I'll report here what the problems were, regarding this error message: Code:
--> FOAM FATAL ERROR: Parser Error for driver PatchValueExpressionDriver at "1.1-4" :"field CRRp not existing or of wrong type" "CRRp/CRRv" ^^^^ --| Code:
functions { //#include "WR_Output" //#include "WR_excess_Output" } Code:
functions { #include "WR_Output" //#include "WR_excess_Output" } Anyway, the next error that was triggered was the one you reported here: http://www.cfd-online.com/Forums/ope...rnal-bool.html - which I can now answer properly there... although technically I had already given you the answer on that thread!!! Best regards, Bruno
__________________
|
|
October 12, 2015, 10:33 |
|
#40 |
Senior Member
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15 |
Hi,
I have followed this thread last week since I wanted to write Cp as the OP wanted, but if you write: Code:
volScalarField Cp ( IOobject ( "Cp", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), thermo.Cp() ); Code:
volScalarField Cp ( IOobject ( "cp", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), thermo.Cp() ); |
|
|
|
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 |