mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -161,10 +161,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
|
||||
|
||||
@ -143,6 +143,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>
|
||||
|
||||
@ -180,10 +180,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
|
||||
|
||||
@ -180,6 +180,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>
|
||||
|
||||
Reference in New Issue
Block a user