From 3ef7831a1ed92037b24a9fa89c5c3b2da7be6d20 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 24 Jun 2010 09:04:39 +0200 Subject: [PATCH 1/9] STYLE: correct header format (as per ccfb6e32a6a2) --- .../functionObjects/field/fieldMinMax/controlDict | 2 +- .../constant/heater/solidThermophysicalProperties | 4 ++-- .../constant/heater/solidThermophysicalProperties | 4 ++-- .../constant/leftSolid/solidThermophysicalProperties | 4 ++-- .../constant/rightSolid/solidThermophysicalProperties | 4 ++-- .../constant/heater/solidThermophysicalProperties | 4 ++-- .../constant/leftSolid/solidThermophysicalProperties | 4 ++-- .../constant/rightSolid/solidThermophysicalProperties | 2 +- tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U | 2 +- .../incompressible/simpleFoam/windTurbineTerrain/0/epsilon | 2 +- .../simpleFoam/windTurbineTerrain/0/include/ABLConditions | 2 +- .../windTurbineTerrain/0/include/initialConditions | 2 +- tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k | 2 +- .../windTurbineTerrain/constant/polyMesh/blockMeshDict | 5 ++--- .../simpleFoam/windTurbineTerrain/constant/polyMesh/boundary | 2 +- .../simpleFoam/windTurbineTerrain/constant/sourcesProperties | 2 +- .../windTurbineTerrain/constant/transportProperties | 2 +- .../simpleFoam/windTurbineTerrain/system/controlDict | 2 +- .../simpleFoam/windTurbineTerrain/system/fvSchemes | 2 +- .../simpleFoam/windTurbineTerrain/system/fvSolution | 2 +- .../simpleFoam/windTurbineTerrain/system/snappyHexMeshDict | 2 +- 21 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/controlDict b/src/postProcessing/functionObjects/field/fieldMinMax/controlDict index d90c5c84fe..4a20373246 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/controlDict +++ b/src/postProcessing/functionObjects/field/fieldMinMax/controlDict @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/heater/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/leftSolid/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/constant/rightSolid/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/heater/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties index c27f08c9f1..6afd8ebe64 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/leftSolid/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile @@ -57,7 +57,7 @@ directionalSolidThermoCoeffs cpValues (1700 1700); KValues ((40 40 40) (40 40 40)); - + coordinateSystem { origin (-0.000062 0.000019 0.000039); diff --git a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties index c27f08c9f1..b301ae2e0d 100644 --- a/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties +++ b/tutorials/heatTransfer/chtMultiRegionSimpleFoam/multiRegionHeater/constant/rightSolid/solidThermophysicalProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U index 806874149e..f23d0ce783 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/U @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/epsilon b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/epsilon index 0663cafd8c..a49793464e 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/epsilon +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/epsilon @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/ABLConditions b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/ABLConditions index 7a66146f67..ce4fb20918 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/ABLConditions +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/ABLConditions @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/initialConditions b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/initialConditions index b7847f97cf..f38c46f61a 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/initialConditions +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/include/initialConditions @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k index 54ed104991..b42f64236c 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/0/k @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/blockMeshDict b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/blockMeshDict index 17849fcf99..99d86d5d23 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/blockMeshDict @@ -1,11 +1,10 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: http://www.openfoam.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ - FoamFile { version 2.0; diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/boundary index 0ae74fcca8..e47d69bab0 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/boundary +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/polyMesh/boundary @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: dev | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/sourcesProperties b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/sourcesProperties index 0b880a8571..90b086769a 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/sourcesProperties +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/sourcesProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/transportProperties b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/transportProperties index a9799687c1..6b86c0cf8f 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/transportProperties +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/constant/transportProperties @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/controlDict b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/controlDict index 654f1c9889..e4c516e48e 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/controlDict +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/controlDict @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSchemes b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSchemes index 60d14bfab4..30ee3b82f4 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSchemes @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSolution b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSolution index ed73a38677..948be6e57a 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/fvSolution @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile diff --git a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/snappyHexMeshDict index 66e1715156..2d64f74634 100644 --- a/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleFoam/windTurbineTerrain/system/snappyHexMeshDict @@ -2,7 +2,7 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7 | -| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile From 51ac7a297bcaaa0c81440f698af6c3e1906b7141 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 24 Jun 2010 09:13:42 +0200 Subject: [PATCH 2/9] STYLE: make sampledPlane note doxygen-compatible --- src/sampling/sampledSurface/sampledPlane/sampledPlane.H | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H index 5142c63143..0262860a94 100644 --- a/src/sampling/sampledSurface/sampledPlane/sampledPlane.H +++ b/src/sampling/sampledSurface/sampledPlane/sampledPlane.H @@ -27,7 +27,8 @@ Class Description A sampledSurface defined by a cuttingPlane. Always triangulated. - Note: does not actually cut until update() called. +Note + Does not actually cut until update() called. SourceFiles sampledPlane.C From 824e5eeb2b2515777e759044535d9e10dfcae87c Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 24 Jun 2010 09:25:12 +0200 Subject: [PATCH 3/9] ENH: add sutherlandTransport/hConstThermo combination --- .../mixtures/basicMixture/basicMixtures.C | 9 ++-- .../basic/psiThermo/ePsiThermo/ePsiThermos.C | 1 + .../hCombustionThermo/hCombustionThermos.C | 41 ++++++++++++++++++- 3 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C index 77ea290e62..0de4b2162a 100644 --- a/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C +++ b/src/thermophysicalModels/basic/mixtures/basicMixture/basicMixtures.C @@ -57,7 +57,7 @@ makeBasicMixture ( pureMixture, constTransport, - hConstThermo, + eConstThermo, perfectGas ); @@ -65,15 +65,16 @@ makeBasicMixture ( pureMixture, sutherlandTransport, - hConstThermo, + eConstThermo, perfectGas ); + makeBasicMixture ( pureMixture, constTransport, - eConstThermo, + hConstThermo, perfectGas ); @@ -81,7 +82,7 @@ makeBasicMixture ( pureMixture, sutherlandTransport, - eConstThermo, + hConstThermo, perfectGas ); diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C index 156de029b0..fc39529ff5 100644 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C +++ b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermos.C @@ -63,6 +63,7 @@ makeBasicPsiThermo perfectGas ); + makeBasicPsiThermo ( ePsiThermo, diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C index 6e6cef2959..419e000f9b 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -53,6 +53,8 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// constTransport, hConstThermo + makeCombustionThermo ( hCombustionThermo, @@ -83,6 +85,42 @@ makeCombustionThermo perfectGas ); + +// sutherlandTransport, hConstThermo + +makeCombustionThermo +( + hCombustionThermo, + hPsiMixtureThermo, + homogeneousMixture, + sutherlandTransport, + hConstThermo, + perfectGas +); + +makeCombustionThermo +( + hCombustionThermo, + hPsiMixtureThermo, + inhomogeneousMixture, + sutherlandTransport, + hConstThermo, + perfectGas +); + +makeCombustionThermo +( + hCombustionThermo, + hPsiMixtureThermo, + veryInhomogeneousMixture, + sutherlandTransport, + hConstThermo, + perfectGas +); + + +// sutherlandTransport, janafThermo + makeCombustionThermo ( hCombustionThermo, @@ -113,6 +151,7 @@ makeCombustionThermo perfectGas ); + makeCombustionThermo ( hCombustionThermo, From aec1bace6c742e0f3f879e8912a2bcf3279c769a Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 28 Jun 2010 09:24:14 +0200 Subject: [PATCH 4/9] ENH: use volume field name for interpolated fields - avoids things like "volPointInterpolate(U)", but will likely cause issues when used together with identically named Lagrangian fields! --- .../PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H | 10 ++++---- .../vtkPV3Foam/vtkPV3FoamPointFields.H | 8 ++++++- .../vtkPV3Foam/vtkPV3FoamVolFields.H | 24 ++++++++++--------- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H index 62e7d42ed1..3446d3fd8e 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H @@ -594,20 +594,22 @@ class vtkPV3Foam vtkMultiBlockDataSet* output ); - //- Point field - all selected parts + //- Point field - all selected parts, use specified display name template void convertPointFieldBlock ( + const word& displayName, const GeometricField&, vtkMultiBlockDataSet* output, const arrayRange&, const List& ); - //- Point fields + //- Point field, use specified display name template void convertPointField ( + const word& displayName, const GeometricField&, const GeometricField&, vtkMultiBlockDataSet* output, @@ -616,11 +618,11 @@ class vtkPV3Foam const polyDecomp& ); - //- Patch point field + //- Patch point field, use specified display name template void convertPatchPointField ( - const word& name, + const word& displayName, const Field&, vtkMultiBlockDataSet* output, const arrayRange&, diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H index a243d81a7c..f762e03530 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H @@ -76,6 +76,7 @@ void Foam::vtkPV3Foam::convertPointFields // Convert activated internalMesh regions convertPointFieldBlock ( + fieldName, ptf, output, arrayRangeVolume_, @@ -85,6 +86,7 @@ void Foam::vtkPV3Foam::convertPointFields // Convert activated cellZones convertPointFieldBlock ( + fieldName, ptf, output, arrayRangeCellZones_, @@ -94,6 +96,7 @@ void Foam::vtkPV3Foam::convertPointFields // Convert activated cellSets convertPointFieldBlock ( + fieldName, ptf, output, arrayRangeCellSets_, @@ -136,6 +139,7 @@ void Foam::vtkPV3Foam::convertPointFields template void Foam::vtkPV3Foam::convertPointFieldBlock ( + const word& displayName, const GeometricField& ptf, vtkMultiBlockDataSet* output, const arrayRange& range, @@ -150,6 +154,7 @@ void Foam::vtkPV3Foam::convertPointFieldBlock { convertPointField ( + displayName, ptf, GeometricField::null(), output, @@ -165,6 +170,7 @@ void Foam::vtkPV3Foam::convertPointFieldBlock template void Foam::vtkPV3Foam::convertPointField ( + const word& displayName, const GeometricField& ptf, const GeometricField& tf, vtkMultiBlockDataSet* output, @@ -192,7 +198,7 @@ void Foam::vtkPV3Foam::convertPointField pointData->SetNumberOfTuples(nPoints + addPointCellLabels.size()); pointData->SetNumberOfComponents(nComp); pointData->Allocate(nComp*(nPoints + addPointCellLabels.size())); - pointData->SetName(ptf.name().c_str()); + pointData->SetName(displayName.c_str()); if (debug) { diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H index cad7ffb011..0046aed0b8 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H @@ -113,8 +113,7 @@ void Foam::vtkPV3Foam::convertVolFields // The name for the interpolated patch point field must be consistent // with the interpolated volume point field. - // This could be done better. - const word pointFldName = "volPointInterpolate(" + tf.name() + ')'; + const word& pointFldName = tf.name(); for ( @@ -276,21 +275,14 @@ void Foam::vtkPV3Foam::convertVolFieldBlock const List& decompLst ) { + const word& pointFldName = tf.name(); + for (int partId = range.start(); partId < range.end(); ++partId) { const label datasetNo = partDataset_[partId]; if (datasetNo >= 0 && partStatus_[partId]) { - convertVolField - ( - tf, - output, - range, - datasetNo, - decompLst[datasetNo] - ); - if (!ptfPtr.valid()) { if (debug) @@ -305,8 +297,18 @@ void Foam::vtkPV3Foam::convertVolFieldBlock ); } + convertVolField + ( + tf, + output, + range, + datasetNo, + decompLst[datasetNo] + ); + convertPointField ( + pointFldName, ptfPtr(), tf, output, From ca7a6f51576c530d7255fe0e48a1c502164519eb Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 28 Jun 2010 09:38:25 +0200 Subject: [PATCH 5/9] ENH: add provisioning for alternative display name for lagrangian fields --- .../PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H | 3 ++- .../PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H index 3446d3fd8e..c51769eaa5 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H @@ -574,10 +574,11 @@ class vtkPV3Foam const label datasetNo ); - //- Lagrangian field + //- Lagrangian field, use specified display name template void convertLagrangianField ( + const word& displayName, const IOField&, vtkMultiBlockDataSet* output, const arrayRange&, diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H index dd4c3b450a..618eaaaf86 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H @@ -51,7 +51,9 @@ void Foam::vtkPV3Foam::convertLagrangianFields if (iter()->headerClassName() == IOField::typeName) { IOField tf(*iter()); - convertLagrangianField(tf, output, range, datasetNo); + // display name for lagrangian field + const word& displayName = tf.name(); + convertLagrangianField(displayName, tf, output, range, datasetNo); } } } @@ -60,6 +62,7 @@ void Foam::vtkPV3Foam::convertLagrangianFields template void Foam::vtkPV3Foam::convertLagrangianField ( + const word& displayName, const IOField& tf, vtkMultiBlockDataSet* output, const arrayRange& range, @@ -72,7 +75,7 @@ void Foam::vtkPV3Foam::convertLagrangianField pointData->SetNumberOfTuples(tf.size()); pointData->SetNumberOfComponents(nComp); pointData->Allocate(nComp*tf.size()); - pointData->SetName(tf.name().c_str()); + pointData->SetName(displayName.c_str()); if (debug) { From 5810f991d7b034a35fe55f7a6b671e7a16347de5 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 2 Jul 2010 09:06:04 +0200 Subject: [PATCH 6/9] STYLE: report when skipping ThirdParty build --- Allwmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Allwmake b/Allwmake index ebe159e376..035b24811b 100755 --- a/Allwmake +++ b/Allwmake @@ -15,6 +15,8 @@ wmakeCheckPwd "$WM_PROJECT_DIR" || { if [ -d "$WM_THIRD_PARTY_DIR" ] then $WM_THIRD_PARTY_DIR/Allwmake +else + echo "no ThirdParty sources found - skipping" fi # build OpenFOAM libraries and applications From 266c4c61dac3e5204b1b4747b935e0db6ca911a8 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 2 Jul 2010 09:14:10 +0200 Subject: [PATCH 7/9] STYLE: remove tabs and trailing space from new scripts --- bin/tools/foamConfigurePaths | 41 ++++++++++++++++++------------------ debian/copyright | 2 +- debian/rules | 4 ++-- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths index 5bd2494b81..823c816d51 100755 --- a/bin/tools/foamConfigurePaths +++ b/bin/tools/foamConfigurePaths @@ -34,10 +34,10 @@ usage() { cat< - and is licensed under the GPL version 3 + and is licensed under the GPL version 3 diff --git a/debian/rules b/debian/rules index ce5f53f5c0..696fcc9216 100755 --- a/debian/rules +++ b/debian/rules @@ -96,13 +96,13 @@ binary-arch: build install dh_fixperms dh_makeshlibs dh_installdeb -# dh_perl +# dh_perl dh_shlibdeps -- --ignore-missing-info #We depend on vtk libs without info dh_gencontrol dh_md5sums dh_builddeb -source diff: +source diff: @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false binary: binary-indep binary-arch From 9745b86ef3d27af9ff42ec43008506a659cf87be Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 6 Jul 2010 14:01:15 +0200 Subject: [PATCH 8/9] ENH: improve foamEtcFile handling (-prefix, -version options) - This lets foamExec use foamEtcFile as well, but debian packaging still needs some work --- bin/foamEtcFile | 33 ++++++++++++++---- bin/foamExec | 90 ++++++++++++++++++++++++------------------------- 2 files changed, 70 insertions(+), 53 deletions(-) diff --git a/bin/foamEtcFile b/bin/foamEtcFile index 084c3f3769..d661e33f6f 100755 --- a/bin/foamEtcFile +++ b/bin/foamEtcFile @@ -39,8 +39,6 @@ # @endverbatim # #------------------------------------------------------------------------------- -unset listOpt quietOpt - usage() { [ "$quietOpt" = true ] && exit 1 @@ -53,7 +51,11 @@ Usage: ${0##*/} [OPTION] fileName options: -list list the directories to be searched -mode any combination of u(user), g(group), o(other) + -prefix specify an alternative installation prefix + (default: $WM_PROJECT_INST_DIR) -quiet suppress all normal output + -version specify an alternative OpenFOAM version + (default: $WM_PROJECT_VERSION) -help print the usage Locate user/group/shipped file with semantics similar to the @@ -75,6 +77,13 @@ USAGE # default mode is 'ugo' mode=ugo +# default prefix/version correspond to the active values, +# but could also extract from the $0 value. +prefix="$WM_PROJECT_INST_DIR" +version="$WM_PROJECT_VERSION" + + +unset listOpt quietOpt # parse options while [ "$#" -gt 0 ] do @@ -100,10 +109,20 @@ do esac shift 2 ;; + -p | -prefix) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + prefix="$2" + shift 2 + ;; -q | -quiet) quietOpt=true shift ;; + -v | -version) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + version="$2" + shift 2 + ;; -*) usage "unknown option: '$*'" ;; @@ -121,21 +140,21 @@ fileName="$1" unset dirList case "$mode" in *u*) # user - dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}/$WM_PROJECT_VERSION" + dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}/$version" dirList="$dirList $HOME/.${WM_PROJECT:-OpenFOAM}" ;; esac case "$mode" in *g*) # group - dirList="$dirList $WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION" - dirList="$dirList $WM_PROJECT_INST_DIR/site" + dirList="$dirList $prefix/site/$version" + dirList="$dirList $prefix/site" ;; esac case "$mode" in -*o*) # other - dirList="$dirList $WM_PROJECT_DIR/etc" +*o*) # other (shipped) + dirList="$dirList $prefix/${WM_PROJECT:-OpenFOAM}-$version/etc" ;; esac set -- $dirList diff --git a/bin/foamExec b/bin/foamExec index 84bf043511..c5106391d0 100755 --- a/bin/foamExec +++ b/bin/foamExec @@ -43,8 +43,9 @@ usage() { Usage: ${0##*/} [OPTION] ... options: - -v ver specify OpenFOAM version - -help this usage + -version specify an alternative OpenFOAM version + (default: taken from \$0 parameter) + -help this usage * run a particular OpenFOAM version of @@ -52,17 +53,34 @@ USAGE exit 1 } +# This script must exist in /OpenFOAM-/bin/ +# or /openfoamVERSION/bin/ +# -# This script should exist in /OpenFOAM-/bin/ -# extract the and elements -# using a function preserves the command args -getDefaults() { - set -- $(echo $0 | sed -e 's@/OpenFOAM-\([^/]*\)/bin/[^/]*$@ \1@') - foamInstall=$1 - version=$2 -} +# the bindir: +binDir="${0%/*}" + +# the project dir: +projectDir="${binDir%/bin}" +export WM_PROJECT_DIR="$projectDir" + +# the prefix dir (same as foamInstall): +prefixDir="${projectDir%/*}" +foamInstall="$prefixDir" + +# the name used for the project directory +projectDirName="${projectDir##*/}" + +# version from OpenFOAM-VERSION (normal) or openfoamVERSION (debian) +version=$(echo $projectDirName | sed -e 's@^openfoam-*@@i') + +# debugging: +# echo "Installed locations:" +# for i in projectDir prefixDir foamInstall projectDirName version +# do +# eval echo "$i=\$$i" +# done -getDefaults # parse options while [ "$#" -gt 0 ] @@ -71,10 +89,10 @@ do -h | -help) usage ;; - -v) - shift - version=$1 - shift + -v | version) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + version=$2 + shift 2 ;; --) shift @@ -89,41 +107,21 @@ do esac done -if [ "$#" -lt 1 ] -then - usage "no application specified" -fi - -unset foamDotFile - -# Check user-specific OpenFOAM bashrc file -foamDotFile="$HOME/.OpenFOAM/$version/bashrc" -if [ -f $foamDotFile ] -then - . $foamDotFile - foamDotFile=okay -else - # Use the FOAM_INST_DIR variable for locating the installed version - for FOAM_INST_DIR in $foamInstall $WM_PROJECT_INST_DIR - do - foamDotFile="$FOAM_INST_DIR/OpenFOAM-$version/etc/bashrc" - if [ -f $foamDotFile ] - then - . $foamDotFile - foamDotFile=okay - break - fi - done -fi +[ "$#" -ge 1 ] || usage "no application specified" -if [ "$foamDotFile" != okay ] -then +# find OpenFOAM settings (bashrc) +foamDotFile="$($binDir/foamEtcFile -version $version bashrc)" +[ $? -eq 0 ] || { echo "Error : bashrc file could not be found for OpenFOAM-$version" 1>&2 exit 1 -fi +} -# Pass on the rest of the arguments -exec $* +# preserve arguments (can otherwise get lost when sourcing the foamDotFile) +args="$*" +. $foamDotFile + +# execute +exec $args #------------------------------------------------------------------------------ From 43407380f9d21022a2379a5dc550cb5bb42db073 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 6 Jul 2010 16:33:25 +0200 Subject: [PATCH 9/9] ENH: improve debian handling in foamEtcFile - remove all corresponding logic from foamExec --- bin/foamEtcFile | 120 ++++++++++++++++++++++++++++++++++-------------- bin/foamExec | 68 +++++---------------------- 2 files changed, 97 insertions(+), 91 deletions(-) diff --git a/bin/foamEtcFile b/bin/foamEtcFile index 1af5ae9bdd..7cea635885 100755 --- a/bin/foamEtcFile +++ b/bin/foamEtcFile @@ -52,10 +52,9 @@ options: -list list the directories to be searched -mode any combination of u(user), g(group), o(other) -prefix specify an alternative installation prefix - (default: $WM_PROJECT_INST_DIR) -quiet suppress all normal output -version specify an alternative OpenFOAM version - (default: $WM_PROJECT_VERSION) + in the form Maj.Min.Rev (eg, 1.7.0) -help print the usage Locate user/group/shipped file with semantics similar to the @@ -73,20 +72,64 @@ USAGE exit 1 } +# +# This script must exist in /OpenFOAM-/bin/ +# or /openfoam/bin/ (for the debian version) +# +#------------------------------------------------------------------------------- + +# the bindir: +binDir="${0%/*}" + +# the project dir: +projectDir="${binDir%/bin}" + +# the prefix dir (same as foamInstall): +prefixDir="${projectDir%/*}" + +# the name used for the project directory +projectDirName="${projectDir##*/}" + +# version number used for debian packaging +unset versionNum + +# +# handle standard and debian naming convention +# +case "$projectDirName" in +OpenFOAM-*) # standard naming convention OpenFOAM- + version="${projectDirName##OpenFOAM-}" + ;; + +openfoam[0-9]*) # debian naming convention 'openfoam' + versionNum="${projectDirName##openfoam}" + case "$versionNum" in + ??) # convert 2 digit version number to decimal delineated + version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)@\1.\2@') + ;; + ???) # convert 3 digit version number to decimal delineated + version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)\(.\)@\1.\2.\3@') + ;; + ????) # convert 4 digit version number to decimal delineated + version=$(echo "$versionNum" | sed -e 's@\(.\)\(.\)\(.\)\(.\)@\1.\2.\3.\4@') + ;; + *) # failback - use current environment setting + version="$WM_PROJECT_VERSION" + ;; + esac + ;; + +*) + echo "Error : unknown/unsupported naming convention" + exit 1 + ;; +esac + # default mode is 'ugo' mode=ugo - -# default prefix/version correspond to the active values, -# but could also extract from the $0 value. -prefix="$WM_PROJECT_INST_DIR" -version="$WM_PROJECT_VERSION" - -# default naming convention is "OpenFOAM-" -projectNamePrefix="${WM_PROJECT:-OpenFOAM}-" - - unset listOpt quietOpt + # parse options while [ "$#" -gt 0 ] do @@ -96,7 +139,6 @@ do ;; -l | -list) listOpt=true - shift ;; -m | -mode) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" @@ -110,21 +152,29 @@ do usage "'$1' option with invalid mode '$mode'" ;; esac - shift 2 + shift ;; -p | -prefix) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" - prefix="$2" - shift 2 + prefixDir="$2" + shift ;; -q | -quiet) quietOpt=true - shift ;; -v | -version) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" version="$2" - shift 2 + # convert x.y.z -> xyz version (if installation looked like debian) + if [ -n "$versionNum" ] + then + versionNum=$(echo "$version" | sed -e 's@\.@@g') + fi + shift + ;; + --) + shift + break ;; -*) usage "unknown option: '$*'" @@ -133,23 +183,16 @@ do break ;; esac + shift done -# -# handle standard and debian naming convention -# -case "$version" in -OpenFOAM-*) # standard naming convention OpenFOAM- - projectNamePrefix="OpenFOAM-" - version="${version##OpenFOAM-}" - ;; - -openfoam[0-9]*) # debian naming convention 'openfoam' - projectNamePrefix="openfoam" - version="${version##openfoam}" - ;; -esac +# debugging: +# echo "Installed locations:" +# for i in projectDir prefixDir projectDirName version versionNum +# do +# eval echo "$i=\$$i" +# done # Save the essential bits of information: @@ -167,14 +210,21 @@ esac case "$mode" in *g*) # group - dirList="$dirList $prefix/site/$version" - dirList="$dirList $prefix/site" + dirList="$dirList $prefixDir/site/$version" + dirList="$dirList $prefixDir/site" ;; esac case "$mode" in *o*) # other (shipped) - dirList="$dirList $prefix/$projectNamePrefix$version/etc" + if [ -n "$versionNum" ] + then + # debian packaging + dirList="$dirList $prefixDir/openfoam$versionNum/etc" + else + # standard packaging + dirList="$dirList $prefixDir/${WM_PROJECT:-OpenFOAM}-$version/etc" + fi ;; esac set -- $dirList diff --git a/bin/foamExec b/bin/foamExec index 05cf253938..1e1d438dfa 100755 --- a/bin/foamExec +++ b/bin/foamExec @@ -35,10 +35,8 @@ # mpirun -np \ # foamExec -v ... -parallel # -# Note: - not consistent with foamEtcFiles - does not search 'site' -# directories -# - version switch -v will not work with the debian naming -# openfoamXXX +# SeeAlso +# foamEtcFile #------------------------------------------------------------------------------ usage() { while [ "$#" -ge 1 ]; do echo "$1"; shift; done @@ -48,7 +46,7 @@ Usage: ${0##*/} [OPTION] ... options: -version specify an alternative OpenFOAM version - (default: taken from \$0 parameter) + pass through to foamEtcFile -help this usage * run a particular OpenFOAM version of @@ -57,54 +55,14 @@ USAGE exit 1 } +# # This script must exist in /OpenFOAM-/bin/ # or /openfoam/bin/ (for the debian version) # +# foamEtcFile is found in the same directory +#------------------------------------------------------------------------------- -# the bindir: -binDir="${0%/*}" - -# the project dir: -projectDir="${binDir%/bin}" -export WM_PROJECT_DIR="$projectDir" - -# the prefix dir (same as foamInstall): -prefixDir="${projectDir%/*}" -foamInstall="$prefixDir" - -# the name used for the project directory -projectDirName="${projectDir##*/}" - -# -# handle standard and debian naming convention -# -case "$projectDirName" in -OpenFOAM-*) # standard naming convention OpenFOAM- - projectNamePrefix="OpenFOAM-" - version="${projectDirName##OpenFOAM-}" - versionNum=$version - ;; - -openfoam[0-9]*) # debian naming convention 'openfoam' - projectNamePrefix="openfoam" - versionNum="${projectDirName##openfoam}" - version=$WM_PROJECT_DIR - ;; -*) - echo "Error : unknown/unsupported naming convention" - exit 1 - ;; -esac - - -# debugging: -# echo "Installed locations:" -# for i in projectDir prefixDir foamInstall projectDirName version versionNum -# do -# eval echo "$i=\$$i" -# done - - +unset etcOpts # parse options while [ "$#" -gt 0 ] do @@ -112,11 +70,10 @@ do -h | -help) usage ;; - -v | version) + -v | -version) [ "$#" -ge 2 ] || usage "'$1' option requires an argument" - version=$2 - versionNum=$version - shift 2 + etcOpts="-version $2" + shift ;; --) shift @@ -129,14 +86,13 @@ do break ;; esac + shift done [ "$#" -ge 1 ] || usage "no application specified" - # find OpenFOAM settings (bashrc) -foamDotFile="$($binDir/foamEtcFile -version $version bashrc)" -[ $? -eq 0 ] || { +foamDotFile="$(${0%/*}/foamEtcFile $etcOpts bashrc)" || { echo "Error : bashrc file could not be found for OpenFOAM-$version" 1>&2 exit 1 }