CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

how can see Cp values?

Register Blogs Community New Posts Updated Threads Search

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2013, 11:59
Default
  #21
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
About funkyDoCalc - answered here: http://www.cfd-online.com/Forums/ope...tml#post418889
__________________
wyldckat is offline   Reply With Quote

Old   April 9, 2013, 07:14
Default
  #22
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   April 19, 2013, 15:05
Default
  #23
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   April 19, 2013, 17:09
Default
  #24
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

In essence, the same way as these two tutorials:
If you study the two tutorials, you'll see that the stuff on the second tutorial is placed into the icoFoam solver!

Have fun! Best regards,
Bruno
immortality likes this.
__________________
wyldckat is offline   Reply With Quote

Old   April 20, 2013, 15:49
Default
  #25
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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?
immortality is offline   Reply With Quote

Old   June 25, 2013, 11:04
Default
  #26
New Member
 
Georg Brösigke
Join Date: Nov 2012
Posts: 6
Rep Power: 14
gork is on a distinguished road
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)
3) Neither Cp nor kappa are listed as possible registered Objects when I use the 'bananas' trick

I would prefer having a solution for 2) but would appreciate any hints

regards Georg
Kummi likes this.

Last edited by gork; June 25, 2013 at 12:29.
gork is offline   Reply With Quote

Old   June 27, 2013, 03:52
Default
  #27
New Member
 
Georg Brösigke
Join Date: Nov 2012
Posts: 6
Rep Power: 14
gork is on a distinguished road
Quote:
Originally Posted by gork View Post
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)
3) Neither Cp nor kappa are listed as possible registered Objects when I use the 'bananas' trick

I would prefer having a solution for 2) but would appreciate any hints

regards Georg
problem solved...
gork is offline   Reply With Quote

Old   October 4, 2013, 09:46
Default
  #28
New Member
 
Peter Bishop
Join Date: Jan 2012
Posts: 20
Rep Power: 14
PeterBishop is on a distinguished road
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
PeterBishop is offline   Reply With Quote

Old   October 5, 2013, 02:32
Default
  #29
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Peter,
Quote:
Originally Posted by PeterBishop View Post
Now I'm tryin to extend it to reactingMixture, I want to calculate Cp as posprocessing of reactingFoam solution.

Any help would be appreciated!
I'll need an example case and a detailed description of what exactly you're trying to do.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   November 18, 2013, 15:57
Default
  #30
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 16
Linse is on a distinguished road
Quote:
Originally Posted by gork
problem solved...
Dear Georg,

I guess, some users would be happy if you explained in a few sentences how you solved the problem. ;-)
Linse is offline   Reply With Quote

Old   November 26, 2013, 03:37
Default
  #31
New Member
 
Georg Brösigke
Join Date: Nov 2012
Posts: 6
Rep Power: 14
gork is on a distinguished road
Quote:
Originally Posted by Linse View Post
Dear Georg,

I guess, some users would be happy if you explained in a few sentences how you solved the problem. ;-)
Dear Bernhard,

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
Attached Files
File Type: c specificHeatKappa.C (2.8 KB, 98 views)
gork is offline   Reply With Quote

Old   June 16, 2015, 07:03
Default
  #32
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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
its the Cp and Cv Field in controlDict:
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;
    }
how to resolve it?
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.
immortality is offline   Reply With Quote

Old   June 17, 2015, 16:23
Default
  #33
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by immortality View Post
how to resolve it?
thank you very much.
Googled:
Code:
swak4Foam expressionField
First answer: http://www.cfd-online.com/Forums/ope...sionfield.html
wyldckat is offline   Reply With Quote

Old   August 13, 2015, 05:13
Default
  #34
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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
while the fields are defined in controlDict as:
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;
    }
thanks for helping.
__________________
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.
immortality is offline   Reply With Quote

Old   August 13, 2015, 10:30
Default
  #35
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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?
wyldckat is offline   Reply With Quote

Old   August 13, 2015, 12:18
Default
  #36
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   August 13, 2015, 12:57
Default
  #37
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
I knew this looked familiar to me:


edit: I found this by Googling:
Code:
site:cfd-online.com "wyldckat" "Cv"
immortality likes this.

Last edited by wyldckat; August 13, 2015 at 12:58. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   August 14, 2015, 12:23
Default
  #38
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27
immortality is on a distinguished road
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;
    }
an error is shown as this one:
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.
immortality is offline   Reply With Quote

Old   August 14, 2015, 15:58
Default
  #39
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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"
  ^^^^
--|
It's actually reaaaaally simple... in the file "system/controlDict", you had this:
Code:
functions
{
//#include "WR_Output"
//#include "WR_excess_Output"
}
Which means that all function objects were disabled, because the file "WR_Output" that has the function objects you were pointing out, ended up never being used, because it wasn't included. The solution was to simply change it to this:
Code:
functions
{
#include "WR_Output"
//#include "WR_excess_Output"
}
And you were expecting that we would be able to diagnose the problem without this extremely important detail

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
immortality likes this.
__________________
wyldckat is offline   Reply With Quote

Old   October 12, 2015, 10:33
Default
  #40
Senior Member
 
Agustín Villa
Join Date: Apr 2013
Location: Alcorcón
Posts: 314
Rep Power: 15
agustinvo is on a distinguished road
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()
    );
it will never write it. Then I noticed that, if instead that you put:

Code:
 volScalarField Cp
    (
        IOobject
        (
            "cp",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::AUTO_WRITE
        ),
        thermo.Cp()
    );
now the heat capacity will appear in your time folders. Later on, in the code of course you have to rewrite "cp=thermo.Cp()".
agustinvo is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 18:12.