From 03cbca684fce816519d5edb9d3de487737bd460c Mon Sep 17 00:00:00 2001 From: Yeongdo Park Date: Fri, 2 Nov 2018 02:56:33 -0400 Subject: [PATCH] move function of T for rotational relaxation calculation to class Particle --- diffusivityModel/Ion/IonI.H | 9 +-------- diffusivityModel/Neutral/NeutralI.H | 10 +--------- diffusivityModel/Particle/Particle.H | 2 ++ diffusivityModel/Particle/ParticleI.H | 15 +++++++++++++++ 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/diffusivityModel/Ion/IonI.H b/diffusivityModel/Ion/IonI.H index f363458..2a6d23b 100644 --- a/diffusivityModel/Ion/IonI.H +++ b/diffusivityModel/Ion/IonI.H @@ -54,15 +54,8 @@ inline Foam::scalar Foam::Ion::Zrot(const scalar T) const { scalar wellDepth_ = 0.0; - scalar a3 = sqrt(pow3(pi)); - scalar a1 = a3/2.0; - scalar a2 = sqr(pi) / 4.0 + 2.0; - scalar t1 = sqrt(wellDepth_/T); - scalar t2 = wellDepth_/T; - scalar t3 = t1 * t2; - - return 1.0 + a1 * t1 + a2 * t2 + a3 * t3; + return Particle::Zrot() * zeta(298.0, wellDepth_) / zeta(T, wellDepth_); } diff --git a/diffusivityModel/Neutral/NeutralI.H b/diffusivityModel/Neutral/NeutralI.H index fc5187e..8858301 100644 --- a/diffusivityModel/Neutral/NeutralI.H +++ b/diffusivityModel/Neutral/NeutralI.H @@ -81,15 +81,7 @@ inline Foam::scalar Foam::Neutral::C6() inline Foam::scalar Foam::Neutral::Zrot(const scalar T) const { - scalar a3 = sqrt(pow3(pi)); - scalar a1 = a3/2.0; - scalar a2 = sqr(pi) / 4.0 + 2.0; - - scalar t1 = sqrt(wellDepth_/T); - scalar t2 = wellDepth_/T; - scalar t3 = t1 * t2; - - return 1.0 + a1 * t1 + a2 * t2 + a3 * t3; + return Particle::Zrot() * zeta(298.0, wellDepth_) / zeta(T, wellDepth_); } diff --git a/diffusivityModel/Particle/Particle.H b/diffusivityModel/Particle/Particle.H index 057330e..1bb435a 100644 --- a/diffusivityModel/Particle/Particle.H +++ b/diffusivityModel/Particle/Particle.H @@ -168,6 +168,8 @@ public: inline scalar Zrot() const; + inline scalar zeta(const scalar T, const scalar wellDepth) const; + // Check // Edit diff --git a/diffusivityModel/Particle/ParticleI.H b/diffusivityModel/Particle/ParticleI.H index fc04423..2789eb4 100644 --- a/diffusivityModel/Particle/ParticleI.H +++ b/diffusivityModel/Particle/ParticleI.H @@ -78,6 +78,21 @@ inline Foam::scalar Foam::Particle::Zrot() } +inline Foam::scalar Foam::Particle::zeta(const scalar T, const scalar wellDepth) + const +{ + const scalar a3 = sqrt(pow3(pi)); + const scalar a1 = a3/2.0; + const scalar a2 = sqr(pi) / 4.0 + 2.0; + + const scalar t1 = sqrt(wellDepth/T); + const scalar t2 = wellDepth/T; + const scalar t3 = t1 * t2; + + return 1.0 + a1 * t1 + a2 * t2 + a3 * t3; +} + + // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //