diff --git a/applications/solvers/multiphase/interFoam/alphaEqn.H b/applications/solvers/multiphase/interFoam/alphaEqn.H index dc1146944e..b96dcf898d 100644 --- a/applications/solvers/multiphase/interFoam/alphaEqn.H +++ b/applications/solvers/multiphase/interFoam/alphaEqn.H @@ -29,7 +29,7 @@ rhoPhi = phiAlpha*(rho1 - rho2) + phi*rho2; } - Info<< "Liquid phase volume fraction = " + Info<< "Phase-1 volume fraction = " << alpha1.weightedAverage(mesh.Vsc()).value() << " Min(alpha1) = " << min(alpha1).value() << " Max(alpha1) = " << max(alpha1).value() diff --git a/applications/test/tensor2D/Make/files b/applications/test/tensor2D/Make/files new file mode 100644 index 0000000000..29b058c0ff --- /dev/null +++ b/applications/test/tensor2D/Make/files @@ -0,0 +1,3 @@ +Test-tensor2D.C + +EXE = $(FOAM_USER_APPBIN)/Test-tensor2D diff --git a/applications/test/tensor2D/Make/options b/applications/test/tensor2D/Make/options new file mode 100644 index 0000000000..e69de29bb2 diff --git a/applications/test/tensor2D/Test-tensor2D.C b/applications/test/tensor2D/Test-tensor2D.C new file mode 100644 index 0000000000..367c924470 --- /dev/null +++ b/applications/test/tensor2D/Test-tensor2D.C @@ -0,0 +1,14 @@ +#include "tensor2D.H" +#include "IOstreams.H" + +using namespace Foam; + +int main() +{ + vector2D v1(1, 2), v2(3, 4); + tensor2D t = v1*v2; + + Info<< "v1(1, 2)*v2(3, 4) = " << t << endl; + + return 0; +} diff --git a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H index 1760cc1f5f..7fe348c9d3 100644 --- a/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H +++ b/src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H @@ -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-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -513,6 +513,14 @@ public: }; +template +class outerProduct, Vector2D > +{ +public: + + typedef Tensor2D type; +}; + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C index ae7552ae15..cf339acd54 100644 --- a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C +++ b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.C @@ -46,7 +46,8 @@ temperatureThermoBaffleFvPatchScalarField turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF), owner_(false), baffle_(), - solidThermoType_("undefined") + solidThermoType_("undefined"), + dict_(dictionary::null) {} @@ -68,7 +69,8 @@ temperatureThermoBaffleFvPatchScalarField ), owner_(ptf.owner_), baffle_(ptf.baffle_), - solidThermoType_(ptf.solidThermoType_) + solidThermoType_(ptf.solidThermoType_), + dict_(ptf.dict_) {} @@ -83,7 +85,8 @@ temperatureThermoBaffleFvPatchScalarField turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(p, iF, dict), owner_(false), baffle_(), - solidThermoType_() + solidThermoType_(), + dict_(dict) { if (!isA(patch().patch())) { @@ -133,7 +136,8 @@ temperatureThermoBaffleFvPatchScalarField turbulentTemperatureCoupledBaffleMixedFvPatchScalarField(ptf, iF), owner_(ptf.owner_), baffle_(ptf.baffle_), - solidThermoType_(ptf.solidThermoType_) + solidThermoType_(ptf.solidThermoType_), + dict_(ptf.dict_) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // @@ -188,30 +192,33 @@ void temperatureThermoBaffleFvPatchScalarField::write(Ostream& os) const if (thisMesh.name() == polyMesh::defaultRegion && owner_) { - os.writeKeyword("thermoBaffleModel") << baffle_->modelName() + word thermoModel = dict_.lookup("thermoBaffleModel"); + + os.writeKeyword("thermoBaffleModel") + << thermoModel << token::END_STATEMENT << nl; - os.writeKeyword("regionName") << baffle_->regionMesh().name() + word regionName = dict_.lookup("regionName"); + os.writeKeyword("regionName") << regionName << token::END_STATEMENT << nl; - os.writeKeyword("infoOutput") << baffle_->infoOutput() + bool infoOutput = readBool(dict_.lookup("infoOutput")); + os.writeKeyword("infoOutput") << infoOutput << token::END_STATEMENT << nl; - os.writeKeyword("active") << baffle_->active() + bool active = readBool(dict_.lookup("active")); + os.writeKeyword("active") << active << token::END_STATEMENT << nl; - os.writeKeyword(word(baffle_->modelName() + "coeffs")); - - os << baffle_->coeffs() << nl; + os.writeKeyword(word(thermoModel + "Coeffs")); + os << dict_.subDict(thermoModel + "Coeffs") << nl; os.writeKeyword("thermoType") << solidThermoType_ << token::END_STATEMENT << nl; - os.writeKeyword(word(solidThermoType_ + "Coeffs")) << nl; + os.writeKeyword(word(solidThermoType_ + "Coeffs")); - os << indent << '{' << nl - << indent << baffle_->thermo() << nl - << indent << '}' << nl; + os << dict_.subDict(solidThermoType_ + "Coeffs") << nl; } } diff --git a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.H b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.H index 0b979f810d..83e3162c57 100644 --- a/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.H +++ b/src/regionModels/thermoBaffleModels/derivedFvPatchFields/temperatureThermoBaffle/temperatureThermoBaffleFvPatchScalarField.H @@ -112,6 +112,9 @@ class temperatureThermoBaffleFvPatchScalarField //- Solid thermo type word solidThermoType_; + //- Dictionary + dictionary dict_; + public: