diff --git a/src/thermophysicalModels/specie/transport/const/constTransport.H b/src/thermophysicalModels/specie/transport/const/constTransport.H index 1c85445ac..a19d9809c 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransport.H +++ b/src/thermophysicalModels/specie/transport/const/constTransport.H @@ -143,10 +143,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 diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index 690b85072..2f45f02bc 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -134,6 +134,52 @@ inline constTransport& constTransport::operator= } +template +inline void Foam::constTransport::operator+= +( + const constTransport& st +) +{ + scalar molr1 = this->nMoles(); + + thermo::operator+=(st); + + molr1 /= this->nMoles(); + scalar molr2 = st.nMoles()/this->nMoles(); + + Mu = molr1*Mu + molr2*st.Mu; + rPr = 1.0/(molr1/rPr + molr2/st.rPr); +} + + +template +inline void Foam::constTransport::operator-= +( + const constTransport& st +) +{ + scalar molr1 = this->nMoles(); + + thermo::operator-=(st); + + molr1 /= this->nMoles(); + scalar molr2 = st.nMoles()/this->nMoles(); + + Mu = molr1*Mu - molr2*st.Mu; + rPr = 1.0/(molr1/rPr - molr2/st.rPr); +} + + +template +inline void Foam::constTransport::operator*= +( + const scalar s +) +{ + thermo::operator*=(s); +} + + // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // template diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H index 5a134d208..9cc9d0c09 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransport.H @@ -165,10 +165,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 diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H index 576e1229a..241605991 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -173,6 +173,52 @@ inline sutherlandTransport& sutherlandTransport::operator= } +template +inline void Foam::sutherlandTransport::operator+= +( + const sutherlandTransport& 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 +inline void Foam::sutherlandTransport::operator-= +( + const sutherlandTransport& 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 +inline void Foam::sutherlandTransport::operator*= +( + const scalar s +) +{ + thermo::operator*=(s); +} + + // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // template