Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit db1e7101f9853db9457c4fbc858a3844659fbbb4 2 parents cdc58d4 + 950f839
mattijs authored
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>
Please sign in to comment.
Something went wrong with that request. Please try again.