def readThermodynamicProperties(runTime, mesh): from Foam.OpenFOAM import ext_Info, nl ext_Info() << "Reading thermodynamicProperties\n" << nl from Foam.OpenFOAM import IOdictionary, IOobject, word, fileName thermodynamicProperties = IOdictionary( IOobject(word("thermodynamicProperties"), fileName(runTime.constant()), mesh, IOobject.MUST_READ, IOobject.NO_WRITE)) from Foam.OpenFOAM import dimensionedScalar R = dimensionedScalar(thermodynamicProperties.lookup(word("R"))) Cv = dimensionedScalar(thermodynamicProperties.lookup(word("Cv"))) Cp = Cv + R gamma = Cp / Cv from Foam.OpenFOAM import dimless Pr = dimensionedScalar(word("Pr"), dimless, 1.0) if thermodynamicProperties.found(word("Pr")): Pr = dimensionedScalar(thermodynamicProperties.lookup("Pr")) pass return thermodynamicProperties, R, Cv, Cp, gamma, Pr
def readThermodynamicProperties( runTime, mesh ): from Foam.OpenFOAM import ext_Info, nl ext_Info() << "Reading thermodynamicProperties\n" << nl from Foam.OpenFOAM import IOdictionary, IOobject, word, fileName thermodynamicProperties = IOdictionary( IOobject( word( "thermodynamicProperties" ), fileName( runTime.constant() ), mesh, IOobject.MUST_READ, IOobject.NO_WRITE ) ) from Foam.OpenFOAM import dimensionedScalar R = dimensionedScalar( thermodynamicProperties.lookup( word( "R" ) ) ) Cv = dimensionedScalar( thermodynamicProperties.lookup( word( "Cv" ) ) ) Cp = Cv + R gamma = Cp / Cv from Foam.OpenFOAM import dimless Pr = dimensionedScalar( word( "Pr" ), dimless, 1.0 ) if thermodynamicProperties.found( word( "Pr" ) ) : Pr = dimensionedScalar( thermodynamicProperties.lookup( "Pr" ) ) pass return thermodynamicProperties, R, Cv, Cp, gamma, Pr
def readThermophysicalProperties(runTime, mesh): from Foam.OpenFOAM import ext_Info, nl ext_Info() << "Reading thermophysicalProperties\n" << nl from Foam.OpenFOAM import IOdictionary, IOobject, word, fileName # Pr defined as a separate constant to enable calculation of k, currently # inaccessible through thermo thermophysicalProperties = IOdictionary( IOobject(word("thermophysicalProperties"), fileName(runTime.constant()), mesh, IOobject.MUST_READ, IOobject.NO_WRITE)) from Foam.OpenFOAM import dimensionedScalar, dimless Pr = dimensionedScalar(word("Pr"), dimless, 1.0) if thermophysicalProperties.found(word("Pr")): Pr = thermophysicalProperties.lookup(word("Pr")) pass return thermophysicalProperties, Pr
def readThermophysicalProperties( runTime, mesh ): from Foam.OpenFOAM import ext_Info, nl ext_Info() << "Reading thermophysicalProperties\n" << nl from Foam.OpenFOAM import IOdictionary, IOobject, word, fileName # Pr defined as a separate constant to enable calculation of k, currently # inaccessible through thermo thermophysicalProperties = IOdictionary( IOobject( word( "thermophysicalProperties" ), fileName( runTime.constant() ), mesh, IOobject.MUST_READ, IOobject.NO_WRITE ) ) from Foam.OpenFOAM import dimensionedScalar, dimless Pr = dimensionedScalar(word( "Pr" ), dimless, 1.0) if thermophysicalProperties.found( word( "Pr" ) ): Pr = thermophysicalProperties.lookup( word( "Pr" ) ) pass return thermophysicalProperties, Pr