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

how can see Cp values?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 7, 2013, 10:59
Default
  #21
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,503
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
About funkyDoCalc - answered here: http://www.cfd-online.com/Forums/ope...tml#post418889
wyldckat is offline   Reply With Quote

Old   April 9, 2013, 06:14
Default
  #22
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 17
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, 14:05
Default
  #23
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 17
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, 16:09
Default
  #24
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,503
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 14:49
Default
  #25
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 17
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, 10:04
Default
  #26
New Member
 
Georg Brösigke
Join Date: Nov 2012
Posts: 6
Rep Power: 4
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

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

Old   June 27, 2013, 02:52
Default
  #27
New Member
 
Georg Brösigke
Join Date: Nov 2012
Posts: 6
Rep Power: 4
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, 08:46
Default
  #28
New Member
 
Peter Bishop
Join Date: Jan 2012
Posts: 19
Rep Power: 5
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, 01:32
Default
  #29
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,503
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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: Magdeburg/Geneva
Posts: 178
Blog Entries: 1
Rep Power: 7
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: 4
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, 19 views)
gork is offline   Reply With Quote

Old   April 29, 2015, 07:17
Default
  #32
Member
 
Cummins
Join Date: Jan 2015
Posts: 30
Rep Power: 2
firefoam is on a distinguished road
Hi,

I tried implementing temperature boundary condition at Inlet as:

T_s = T_0 + 1/C_p(Q_f/m" - Hv)


Here is my files

Code:
boundaryField
{
    outlet
    {
        type            inletOutlet;
        inletValue      uniform 298.15;
        value           uniform 298.15;
    }
    sides
    {
        type            inletOutlet;
        inletValue      uniform 298.15;
        value           uniform 298.15;
    }
    base
    {
        type            zeroGradient;
    }
    inlet
    {
    type                          groovyBC;
    valueExpression        "T0+((1/cpi)*((Qf/m)-Hv))";
    variables                  "T0=300;m{inlet}=phi;Hv=8500;Qf{inlet}=Qr;cpi{inlet}=cp;";
    value                        300;

    }
controlDict
Code:
application     fireFoam;

startFrom       startTime;

startTime       0.0;

stopAt          endTime;

endTime         1.0;

deltaT          1.0e-2;

writeControl    adjustableRunTime;

writeInterval   0.01;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

graphFormat     raw;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           0.6;

maxDeltaT       0.1;

functions
{
    fieldAverage
    {
        type            fieldAverage;
        functionObjectLibs ( "libfieldFunctionObjects.so" );
        enabled         true;
        outputControl   outputTime;

        fields
        (
              U
              {
                  mean on;
                  prime2Mean on;
                  base time;
              }
          T
              {
                  mean on;
                  prime2Mean on;
                  base time;
              }
          CH4
              {
                  mean on;
                  prime2Mean on;
                  base time;
              }
          CO2
              {
                  mean on;
                  prime2Mean on;
                  base time;
              }
          H2O
              {
                  mean on;
                  prime2Mean on;
                  base time;
              }
          O2
              {
                  mean on;
                  prime2Mean on;
                  base time;
              }
        );
    }

libs (
    "libOpenFOAM.so"
    "libgroovyBC.so"
    "libgroovyStandardBCs.so"
    "libsimpleFunctionObjects.so"
    "libsimpleSwakFunctionObjects.so"
    "libswakFunctionObjects.so"
    "libswakPythonIntegration.so"
    "libswakTransportTurbFunctionPlugin.so"
) ;
I also checked my solver fireFoam createFields.H to check how Cp is being used.

createFields.H
Code:
volScalarField cp
    (
        IOobject
        (
            "cp",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),
        thermo.Cp()
    );
I am getting this error:
Code:
swak4Foam: Setting default mesh
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-2" :"field Qr not existing or of wrong type"
"Qr"
  ^^
--| 

Context of the error:


- Driver constructed from scratch
  Evaluating expression "Qr"


    From function parsingValue
    in file lnInclude/CommonValueExpressionDriverI.H at line 1189.

FOAM exiting
What should I modify in me expressions? Have I defined cp correctly or should I change to thermo.Cp? Here Qr is totat radiative flux being calculated through radiation model. I am not able to understand the error. Please help

Thanks in advance....

Last edited by wyldckat; May 16, 2015 at 19:22. Reason: Added [CODE][/CODE] markers
firefoam is offline   Reply With Quote

Old   June 16, 2015, 06:03
Default
  #33
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 17
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, 15:23
Default
  #34
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,503
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Quote:
Originally Posted by immortality View Post
how to resolve it?
thank you very much.
Googled:
Code:
swak4Foam expressionField
First answer: Using fieldAverage together with swak4foam expressionField
wyldckat is offline   Reply With Quote

Old   August 13, 2015, 04:13
Default
  #35
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 17
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, 09:30
Default
  #36
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,503
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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, 11:18
Default
  #37
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 17
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, 11:57
Default
  #38
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,503
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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 11:58. Reason: see "edit:"
wyldckat is offline   Reply With Quote

Old   August 14, 2015, 11:23
Default
  #39
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,205
Rep Power: 17
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, 14:58
Default
  #40
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 8,503
Blog Entries: 34
Rep Power: 86
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
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: an odd Fatal Error:ExpressionResult::calcIsSingleValueInternal< bool>() - 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

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
TimeVaryingMappedFixedValue irishdave OpenFOAM Running, Solving & CFD 28 May 28, 2015 13:37
Numerical errors in nested domain with pre-calculated boundary values Arnoldinho OpenFOAM Running, Solving & CFD 3 April 4, 2012 10:31
max node values exceed max element values in contour plot jason_t FLUENT 0 August 19, 2009 11:32
exact face values RubenG Main CFD Forum 0 June 22, 2009 11: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 23:51.