From 3402f87a7c51e89fb1657b8a7b7e059462cd9373 Mon Sep 17 00:00:00 2001 From: Sergio Ferraris Date: Mon, 9 Sep 2013 16:10:43 +0100 Subject: [PATCH 1/2] BUG: Fixing naming of SolidChemistrySolverType templates and add fvSchemes for laplacian of T in the solid for ppositeBurningPanels tutorial --- .../solidChemistryModel/makeSolidChemistryModel.H | 3 +-- .../solidChemistrySolver/makeSolidChemistrySolverType.H | 5 ++--- .../les/oppositeBurningPanels/system/panelRegion/fvSchemes | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H b/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H index 7f24af81d6..f55698b435 100644 --- a/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H +++ b/src/thermophysicalModels/solidChemistryModel/makeSolidChemistryModel.H @@ -57,8 +57,7 @@ namespace Foam ( \ SS##Comp##SThermo##GThermo, \ (word(SS::typeName_()) + "<"#Comp"," + SThermo::typeName() + "," + \ - GThermo::typeName() + \ - ">").c_str(), \ + GThermo::typeName() + ">").c_str(), \ 0 \ ); diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H index 447020e2f7..6eb8e9b81b 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H @@ -52,8 +52,8 @@ namespace Foam defineTemplateTypeNameAndDebugWithName \ ( \ SS##Schem##Comp##SThermo##GThermo, \ - (#SS"<"#Schem"<"#Comp"," + SThermo::typeName() + "," \ - + GThermo::typeName() + ">>").c_str(), \ + (#SS"<" + word(Schem::typeName_()) + "<"#Comp"," + SThermo::typeName()\ + + "," + GThermo::typeName() + ">>").c_str(), \ 0 \ ); \ \ @@ -76,7 +76,6 @@ namespace Foam GThermo \ ); \ \ - \ makeSolidChemistrySolverType \ ( \ ode, \ diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes index afb9f402f1..7ba1c2cc9d 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/system/panelRegion/fvSchemes @@ -33,6 +33,7 @@ laplacianSchemes { default none; laplacian(thermo:alpha,h) Gauss linear uncorrected; + laplacian(kappa,T) Gauss harmonic uncorrected; } interpolationSchemes From ab6aac74e20531556e8d7a2a0f3a637ecfd5a960 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 9 Sep 2013 17:34:37 +0100 Subject: [PATCH 2/2] ENH: curvatureSeparation film model - check that gravity is set/valid --- .../curvatureSeparation/curvatureSeparation.C | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C index 27376b14d5..0d8011404c 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/injectionModel/curvatureSeparation/curvatureSeparation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -229,8 +229,24 @@ curvatureSeparation::curvatureSeparation deltaByR1Min_(coeffs().lookupOrDefault("deltaByR1Min", 0.0)), definedPatchRadii_(), magG_(mag(owner.g().value())), - gHat_(owner.g().value()/magG_) + gHat_(vector::zero) { + if (magG_ < ROOTVSMALL) + { + FatalErrorIn + ( + "curvatureSeparation::curvatureSeparation" + "(" + "const surfaceFilmModel&, " + "const dictionary&" + ")" + ) + << "Acceleration due to gravity must be non-zero" + << exit(FatalError); + } + + gHat_ = owner.g().value()/magG_; + List > prIn(coeffs().lookup("definedPatchRadii")); const wordList& allPatchNames = owner.regionMesh().boundaryMesh().names();