From 939a46c8443f244d23b238a00c8acb2bd9ed8d60 Mon Sep 17 00:00:00 2001 From: henry Date: Fri, 27 Jun 2008 16:39:42 +0100 Subject: [PATCH] Added pd, changed p BCs to calculated and added pRef to thermophysicalProperties --- .../heatTransfer/buoyantFoam/createFields.H | 2 +- .../heatTransfer/buoyantSimpleFoam/createFields.H | 11 ++++++++--- .../buoyantSimpleRadiationFoam/createFields.H | 3 +-- .../chtMultiRegionFoam/fluid/createFluidFields.H | 7 ++++++- .../heatTransfer/lesBuoyantFoam/createFields.H | 2 +- tutorials/buoyantFoam/hotRoom/0/p | 12 ++++++------ .../hotRoom/constant/thermophysicalProperties | 2 ++ tutorials/buoyantSimpleFoam/hotRoom/0/p | 14 +++++++------- .../hotRoom/constant/thermophysicalProperties | 2 ++ .../hotRadiationRoom/0/p | 14 +++++++------- .../constant/thermophysicalProperties | 2 ++ 11 files changed, 43 insertions(+), 28 deletions(-) diff --git a/applications/solvers/heatTransfer/buoyantFoam/createFields.H b/applications/solvers/heatTransfer/buoyantFoam/createFields.H index 03f021f08d..0a5a098d9f 100644 --- a/applications/solvers/heatTransfer/buoyantFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantFoam/createFields.H @@ -58,7 +58,7 @@ Info<< "Calculating field g.h\n" << endl; volScalarField gh("gh", g & mesh.C()); - dimensionedScalar pRef("pRef", p.dimensions(), 1.0e5); + dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef")); Info<< "Creating field pd\n" << endl; volScalarField pd diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H index 84d260b9be..184242be81 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/createFields.H @@ -54,8 +54,7 @@ Info<< "Calculating field g.h\n" << endl; volScalarField gh("gh", g & mesh.C()); - - dimensionedScalar pRef("pRef", p.dimensions(), 1.0e5); + dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef")); Info<< "Creating field pd\n" << endl; volScalarField pd @@ -77,7 +76,13 @@ label pdRefCell = 0; scalar pdRefValue = 0.0; - setRefCell(pd, mesh.solutionDict().subDict("SIMPLE"), pdRefCell, pdRefValue); + setRefCell + ( + pd, + mesh.solutionDict().subDict("SIMPLE"), + pdRefCell, + pdRefValue + ); dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/createFields.H b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/createFields.H index ceab125f14..76e3805bca 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/createFields.H +++ b/applications/solvers/heatTransfer/buoyantSimpleRadiationFoam/createFields.H @@ -55,8 +55,7 @@ Info<< "Calculating field g.h\n" << endl; volScalarField gh("gh", g & mesh.C()); - - dimensionedScalar pRef("pRef", p.dimensions(), 1.0e5); + dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef")); Info<< "Creating field pd\n" << endl; volScalarField pd diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H index 903ec348b0..6460cc9990 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/createFluidFields.H @@ -11,7 +11,12 @@ List initialMassf(fluidRegions.size()); - dimensionedScalar pRef("pRef", dimensionSet(1, -1, -2, 0, 0), 1.0E5); + dimensionedScalar pRef + ( + "pRef", + dimensionSet(1, -1, -2, 0, 0), + rp.lookup("pRef") + ); // Populate fluid field pointer lists forAll(fluidRegions, i) diff --git a/applications/solvers/heatTransfer/lesBuoyantFoam/createFields.H b/applications/solvers/heatTransfer/lesBuoyantFoam/createFields.H index bad19da447..7b63660f7e 100644 --- a/applications/solvers/heatTransfer/lesBuoyantFoam/createFields.H +++ b/applications/solvers/heatTransfer/lesBuoyantFoam/createFields.H @@ -53,7 +53,7 @@ Info<< "Calculating field g.h\n" << endl; volScalarField gh("gh", g & mesh.C()); - dimensionedScalar pRef("pRef", p.dimensions(), 0.0); + dimensionedScalar pRef("pRef", p.dimensions(), thermo->lookup("pRef")); Info<< "Creating field pd\n" << endl; volScalarField pd diff --git a/tutorials/buoyantFoam/hotRoom/0/p b/tutorials/buoyantFoam/hotRoom/0/p index cdf7cab2f7..10cf8ccf8e 100644 --- a/tutorials/buoyantFoam/hotRoom/0/p +++ b/tutorials/buoyantFoam/hotRoom/0/p @@ -20,21 +20,21 @@ internalField uniform 100000; boundaryField { - floor + floor { - type fixedFluxBuoyantPressure; + type calculated; value uniform 100000; } - ceiling + ceiling { - type fixedFluxBuoyantPressure; + type calculated; value uniform 100000; } - fixedWalls + fixedWalls { - type fixedFluxBuoyantPressure; + type calculated; value uniform 100000; } } diff --git a/tutorials/buoyantFoam/hotRoom/constant/thermophysicalProperties b/tutorials/buoyantFoam/hotRoom/constant/thermophysicalProperties index 7eb3ee5b9f..845c425d42 100644 --- a/tutorials/buoyantFoam/hotRoom/constant/thermophysicalProperties +++ b/tutorials/buoyantFoam/hotRoom/constant/thermophysicalProperties @@ -18,4 +18,6 @@ thermoType hThermo