Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:OpenFOAM/OpenFOAM-2.1.x

commit ccbaf836072aeff5696c682572b442b7588e3d1f 2 parents a08fd8c + c1330db
Henry authored
View
16 applications/solvers/multiphase/interPhaseChangeFoam/createFields.H
@@ -12,20 +12,6 @@
mesh
);
- Info<< "Reading field alpha1\n" << endl;
- volScalarField alpha1
- (
- IOobject
- (
- "alpha1",
- runTime.timeName(),
- mesh,
- IOobject::MUST_READ,
- IOobject::AUTO_WRITE
- ),
- mesh
- );
-
Info<< "Reading field U\n" << endl;
volVectorField U
(
@@ -46,6 +32,8 @@
autoPtr<phaseChangeTwoPhaseMixture> twoPhaseProperties =
phaseChangeTwoPhaseMixture::New(U, phi);
+ volScalarField& alpha1(twoPhaseProperties->alpha1());
+
const dimensionedScalar& rho1 = twoPhaseProperties->rho1();
const dimensionedScalar& rho2 = twoPhaseProperties->rho2();
const dimensionedScalar& pSat = twoPhaseProperties->pSat();
View
14 applications/solvers/multiphase/interPhaseChangeFoam/interPhaseChangeFoam.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
@@ -80,9 +80,10 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
- #include "alphaEqnSubCycle.H"
+ twoPhaseProperties->correct();
- turbulence->correct();
+ #include "alphaEqnSubCycle.H"
+ interface.correct();
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
@@ -94,9 +95,12 @@ int main(int argc, char *argv[])
{
#include "pEqn.H"
}
- }
- twoPhaseProperties->correct();
+ if (pimple.turbCorr())
+ {
+ turbulence->correct();
+ }
+ }
runTime.write();
View
11 src/thermophysicalModels/specie/transport/const/constTransport.H
@@ -155,10 +155,13 @@ public:
// Member operators
- inline constTransport& operator=
- (
- const constTransport&
- );
+ inline constTransport& operator=(const constTransport&);
+
+ inline void operator+=(const constTransport&);
+
+ inline void operator-=(const constTransport&);
+
+ inline void operator*=(const scalar);
// Friend operators
View
46 src/thermophysicalModels/specie/transport/const/constTransportI.H
@@ -137,6 +137,52 @@ inline Foam::constTransport<Thermo>& Foam::constTransport<Thermo>::operator=
}
+template<class Thermo>
+inline void Foam::constTransport<Thermo>::operator+=
+(
+ const constTransport<Thermo>& st
+)
+{
+ scalar molr1 = this->nMoles();
+
+ Thermo::operator+=(st);
+
+ molr1 /= this->nMoles();
+ scalar molr2 = st.nMoles()/this->nMoles();
+
+ mu_ = molr1*mu_ + molr2*st.mu_;
+ rPr_ = molr1*rPr_ + molr2*st.rPr_;
+}
+
+
+template<class Thermo>
+inline void Foam::constTransport<Thermo>::operator-=
+(
+ const constTransport<Thermo>& st
+)
+{
+ scalar molr1 = this->nMoles();
+
+ Thermo::operator-=(st);
+
+ molr1 /= this->nMoles();
+ scalar molr2 = st.nMoles()/this->nMoles();
+
+ mu_ = molr1*mu_ - molr2*st.mu_;
+ rPr_ = molr1*rPr_ - molr2*st.rPr_;
+}
+
+
+template<class Thermo>
+inline void Foam::constTransport<Thermo>::operator*=
+(
+ const scalar s
+)
+{
+ Thermo::operator*=(s);
+}
+
+
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
template<class Thermo>
View
11 src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H
@@ -174,10 +174,13 @@ public:
// Member operators
- inline sutherlandTransport& operator=
- (
- const sutherlandTransport&
- );
+ inline sutherlandTransport& operator=(const sutherlandTransport&);
+
+ inline void operator+=(const sutherlandTransport&);
+
+ inline void operator-=(const sutherlandTransport&);
+
+ inline void operator*=(const scalar);
// Friend operators
View
46 src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H
@@ -182,6 +182,52 @@ Foam::sutherlandTransport<Thermo>::operator=
}
+template<class Thermo>
+inline void Foam::sutherlandTransport<Thermo>::operator+=
+(
+ const sutherlandTransport<Thermo>& st
+)
+{
+ scalar molr1 = this->nMoles();
+
+ Thermo::operator+=(st);
+
+ molr1 /= this->nMoles();
+ scalar molr2 = st.nMoles()/this->nMoles();
+
+ As_ = molr1*As_ + molr2*st.As_;
+ Ts_ = molr1*Ts_ + molr2*st.Ts_;
+}
+
+
+template<class Thermo>
+inline void Foam::sutherlandTransport<Thermo>::operator-=
+(
+ const sutherlandTransport<Thermo>& st
+)
+{
+ scalar molr1 = this->nMoles();
+
+ Thermo::operator-=(st);
+
+ molr1 /= this->nMoles();
+ scalar molr2 = st.nMoles()/this->nMoles();
+
+ As_ = molr1*As_ - molr2*st.As_;
+ Ts_ = molr1*Ts_ - molr2*st.Ts_;
+}
+
+
+template<class Thermo>
+inline void Foam::sutherlandTransport<Thermo>::operator*=
+(
+ const scalar s
+)
+{
+ Thermo::operator*=(s);
+}
+
+
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
template<class Thermo>
View
31 ...derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.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
@@ -191,6 +191,35 @@ externalWallHeatFluxTemperatureFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
+void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::autoMap
+(
+ const fvPatchFieldMapper& m
+)
+{
+ mixedFvPatchScalarField::autoMap(m);
+ q_.autoMap(m);
+ h_.autoMap(m);
+ Ta_.autoMap(m);
+}
+
+
+void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::rmap
+(
+ const fvPatchScalarField& ptf,
+ const labelList& addr
+)
+{
+ mixedFvPatchScalarField::rmap(ptf, addr);
+
+ const externalWallHeatFluxTemperatureFvPatchScalarField& tiptf =
+ refCast<const externalWallHeatFluxTemperatureFvPatchScalarField>(ptf);
+
+ q_.rmap(tiptf.q_, addr);
+ h_.rmap(tiptf.h_, addr);
+ Ta_.rmap(tiptf.Ta_, addr);
+}
+
+
void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
{
if (updated())
View
18 ...derivedFvPatchFields/externalWallHeatFluxTemperature/externalWallHeatFluxTemperatureFvPatchScalarField.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-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@@ -173,6 +173,22 @@ public:
// Member functions
+ // Mapping functions
+
+ //- Map (and resize as needed) from self given a mapping object
+ virtual void autoMap
+ (
+ const fvPatchFieldMapper&
+ );
+
+ //- Reverse map the given fvPatchField onto this fvPatchField
+ virtual void rmap
+ (
+ const fvPatchScalarField&,
+ const labelList&
+ );
+
+
// Evaluation functions
//- Update the coefficients associated with the patch field
Please sign in to comment.
Something went wrong with that request. Please try again.