mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
timeInfo and timeValue
- timeInfo updated - timeValue type is added = double - AB2 bug fixed - updateInterval for broadSearch is activated
This commit is contained in:
@ -25,12 +25,6 @@ Licence:
|
||||
#include "symArrays.hpp"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
namespace pFlow::cfModels
|
||||
{
|
||||
|
||||
@ -159,7 +153,7 @@ protected:
|
||||
{
|
||||
|
||||
etha_t[i] = -2.0*log( et[i])*sqrt(kt[i]*2/7) /
|
||||
sqrt(log(pow(et[i],2.0))+ pow(Pi,2.0));
|
||||
sqrt(log(pow(et[i],2))+ pow(Pi,2));
|
||||
}
|
||||
|
||||
Vector<linearProperties> prop("prop", nElem);
|
||||
@ -285,8 +279,8 @@ public:
|
||||
|
||||
history.overlap_t_ += Vt*dt;
|
||||
|
||||
real mi = 3*Pi/4*pow(Ri,3.0)*rho_[propId_i];
|
||||
real mj = 3*Pi/4*pow(Rj,3.0)*rho_[propId_j];
|
||||
real mi = 3*Pi/4*pow(Ri,3)*rho_[propId_i];
|
||||
real mj = 3*Pi/4*pow(Rj,3)*rho_[propId_j];
|
||||
|
||||
real sqrt_meff = sqrt((mi*mj)/(mi+mj));
|
||||
|
||||
@ -299,29 +293,24 @@ public:
|
||||
else if (addDissipationModel_==3)
|
||||
{
|
||||
auto pie =3.14;
|
||||
prop.en_ = exp((pow(f_,1.5)*log(prop.en_)*sqrt( (1-((pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(pie,2))))/(1-(pow(f_,3)*(pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(pie,2)))) ) ));
|
||||
prop.en_ = exp((pow(f_,static_cast<real>(1.5))*log(prop.en_)*sqrt( (1-((pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(pie,2))))/(1-(pow(f_,3)*(pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(pie,2)))) ) ));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
real ethan_ = -2.0*log(prop.en_)*sqrt(prop.kn_)/
|
||||
sqrt(pow(log(prop.en_),2.0)+ pow(Pi,2.0));
|
||||
sqrt(pow(log(prop.en_),2)+ pow(Pi,2));
|
||||
|
||||
//REPORT(0)<<"\n en n is : "<<END_REPORT;
|
||||
//REPORT(0)<< prop.en_ <<END_REPORT;
|
||||
|
||||
FCn = ( -pow(f_,3.0)*prop.kn_ * ovrlp_n - sqrt_meff * pow(f_,1.5) * ethan_ * vrn)*Nij;
|
||||
FCt = ( -pow(f_,3.0)*prop.kt_ * history.overlap_t_ - sqrt_meff * pow(f_,1.5) * prop.ethat_*Vt);
|
||||
|
||||
|
||||
|
||||
FCn = ( -pow(f_,3)*prop.kn_ * ovrlp_n - sqrt_meff * pow(f_,static_cast<real>(1.5)) * ethan_ * vrn)*Nij;
|
||||
FCt = ( -pow(f_,3)*prop.kt_ * history.overlap_t_ - sqrt_meff * pow(f_,static_cast<real>(1.5)) * prop.ethat_*Vt);
|
||||
|
||||
real ft = length(FCt);
|
||||
real ft_fric = prop.mu_ * length(FCn);
|
||||
|
||||
if(ft > ft_fric)
|
||||
{
|
||||
if( length(history.overlap_t_) >static_cast<real>(0.0))
|
||||
if( length(history.overlap_t_) >zero)
|
||||
{
|
||||
if constexpr (limited)
|
||||
{
|
||||
|
@ -236,7 +236,7 @@ public:
|
||||
|
||||
const auto prop = nonlinearProperties_(propId_i,propId_j);
|
||||
|
||||
const real f = 2.0/( 1.0/cGFi + 1.0/cGFj );
|
||||
const real f = 2/( 1/cGFi + 1/cGFj );
|
||||
|
||||
real vrn = dot(Vr, Nij);
|
||||
realx3 Vt = Vr - vrn*Nij;
|
||||
@ -245,7 +245,7 @@ public:
|
||||
|
||||
real mi = 3*Pi/4*pow(Ri,static_cast<real>(3))*rho_[propId_i];
|
||||
real mj = 3*Pi/4*pow(Rj,static_cast<real>(3))*rho_[propId_j];
|
||||
real Reff = 1.0/(1/Ri + 1/Rj);
|
||||
real Reff = 1/(1/Ri + 1/Rj);
|
||||
|
||||
real K_hertz = 4.0/3.0*prop.Yeff_*sqrt(Reff);
|
||||
real sqrt_meff_K_hertz = sqrt((mi*mj)/(mi+mj) * K_hertz);
|
||||
@ -258,13 +258,13 @@ public:
|
||||
else if (addDissipationModel_==3)
|
||||
{
|
||||
|
||||
en = exp((pow(f,1.5)*log(prop.en_)*sqrt( (1-((pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(Pi,2))))/(1-(pow(f,3)*(pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(Pi,2)))) ) ));
|
||||
en = exp((pow(f,static_cast<real>(1.5))*log(prop.en_)*sqrt( (1-((pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(Pi,2))))/(1-(pow(f,3)*(pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(Pi,2)))) ) ));
|
||||
}
|
||||
|
||||
real Kn = static_cast<real>(4.0/3.0) * prop.Yeff_ * sqrt(Reff*ovrlp_n);
|
||||
|
||||
real ethan_ = -2.0*log(en)*sqrt(Kn)/
|
||||
sqrt(pow(log(en),2.0)+ pow(Pi,2.0));
|
||||
sqrt(pow(log(en),2)+ pow(Pi,2));
|
||||
|
||||
FCn = ( - Kn*ovrlp_n -
|
||||
sqrt_meff_K_hertz*ethan_*pow(ovrlp_n,static_cast<real>(0.25))*vrn)*Nij;
|
||||
|
@ -255,8 +255,8 @@ public:
|
||||
|
||||
history.overlap_t_ += Vt*dt;
|
||||
|
||||
real mi = 3*Pi/4*pow(Ri,3.0)*rho_[propId_i];
|
||||
real mj = 3*Pi/4*pow(Rj,3.0)*rho_[propId_j];
|
||||
real mi = 3*Pi/4*pow(Ri,3)*rho_[propId_i];
|
||||
real mj = 3*Pi/4*pow(Rj,3)*rho_[propId_j];
|
||||
|
||||
real sqrt_meff = sqrt((mi*mj)/(mi+mj));
|
||||
|
||||
@ -268,14 +268,26 @@ public:
|
||||
else if (addDissipationModel_==3)
|
||||
{
|
||||
|
||||
en = exp((pow(f_,1.5)*log(prop.en_)*sqrt( (1-((pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(Pi,2))))/(1-(pow(f_,3)*(pow(log(prop.en_),2))/(pow(log(prop.en_),2)+pow(Pi,2)))) ) ));
|
||||
en = exp(
|
||||
(
|
||||
pow(f_,static_cast<real>(1.5))*
|
||||
log(prop.en_)*
|
||||
sqrt(
|
||||
(1-((pow(log(prop.en_),static_cast<real>(2.0))
|
||||
)/
|
||||
(
|
||||
pow(log(prop.en_),static_cast<real>(2.0))+
|
||||
pow(Pi,static_cast<real>(2.0)))))/
|
||||
(1-(pow(f_,3)*(pow(log(prop.en_),2))/
|
||||
(pow(log(prop.en_),static_cast<real>(2.0))+
|
||||
pow(Pi,static_cast<real>(2.0))))) ) ));
|
||||
}
|
||||
|
||||
real ethan_ = -2.0*log(en)*sqrt(prop.kn_)/
|
||||
sqrt(pow(log(en),2.0)+ pow(Pi,2.0));
|
||||
sqrt(pow(log(en),2)+ pow(Pi,2));
|
||||
|
||||
|
||||
FCn = ( -f_*prop.kn_ * ovrlp_n - sqrt_meff * pow(f_,0.5) * ethan_ * vrn)*Nij;
|
||||
FCn = ( -f_*prop.kn_ * ovrlp_n - sqrt_meff * pow(f_,half) * ethan_ * vrn)*Nij;
|
||||
FCt = ( -f_*prop.kt_ * history.overlap_t_);
|
||||
|
||||
|
||||
|
@ -139,10 +139,10 @@ protected:
|
||||
ForAll(i , kn)
|
||||
{
|
||||
etha_n[i] = -2.0*log(en[i])*sqrt(kn[i])/
|
||||
sqrt(pow(log(en[i]),2.0)+ pow(Pi,2.0));
|
||||
sqrt(pow(log(en[i]),static_cast<real>(2.0))+ pow(Pi,static_cast<real>(2.0)));
|
||||
|
||||
etha_t[i] = -2.0*log( et[i]*sqrt(kt[i]) )/
|
||||
sqrt(pow(log(et[i]),2.0)+ pow(Pi,2.0));
|
||||
sqrt(pow(log(et[i]),static_cast<real>(2.0))+ pow(Pi,static_cast<real>(2.0)));
|
||||
}
|
||||
|
||||
Vector<linearProperties> prop("prop", nElem);
|
||||
@ -243,8 +243,8 @@ public:
|
||||
|
||||
history.overlap_t_ += Vt*dt;
|
||||
|
||||
real mi = 3*Pi/4*pow(Ri,3.0)*rho_[propId_i];
|
||||
real mj = 3*Pi/4*pow(Rj,3.0)*rho_[propId_j];
|
||||
real mi = 3*Pi/4*pow(Ri,static_cast<real>(3.0))*rho_[propId_i];
|
||||
real mj = 3*Pi/4*pow(Rj,static_cast<real>(3.0))*rho_[propId_j];
|
||||
|
||||
real sqrt_meff = sqrt((mi*mj)/(mi+mj));
|
||||
|
||||
|
@ -131,7 +131,7 @@ protected:
|
||||
// we take out sqrt(meff*K_hertz) here and then consider this term
|
||||
// when calculating damping part.
|
||||
etha_n[i] = -2.2664*log(en[i])/
|
||||
sqrt(pow(log(en[i]),2.0)+ pow(Pi,2.0));
|
||||
sqrt(pow(log(en[i]),static_cast<real>(2.0))+ pow(Pi,static_cast<real>(2.0)));
|
||||
|
||||
// no damping for tangential part
|
||||
|
||||
@ -255,7 +255,7 @@ public:
|
||||
// apply friction
|
||||
if(ft > ft_fric)
|
||||
{
|
||||
if( length(history.overlap_t_) >0.0)
|
||||
if( length(history.overlap_t_) >zero)
|
||||
{
|
||||
if constexpr (limited)
|
||||
{
|
||||
|
@ -96,10 +96,10 @@ public:
|
||||
realx3 w_hat = wi-wj;
|
||||
real w_hat_mag = length(w_hat);
|
||||
|
||||
if( !equal(w_hat_mag,0.0) )
|
||||
if( !equal(w_hat_mag,zero) )
|
||||
w_hat /= w_hat_mag;
|
||||
else
|
||||
w_hat = 0.0;
|
||||
w_hat = zero;
|
||||
|
||||
auto Reff = (Ri*Rj)/(Ri+Rj);
|
||||
|
||||
|
@ -94,10 +94,10 @@ public:
|
||||
realx3 w_hat = wi-wj;
|
||||
real w_hat_mag = length(w_hat);
|
||||
|
||||
if( !equal(w_hat_mag,0.0) )
|
||||
if( !equal(w_hat_mag,zero) )
|
||||
w_hat /= w_hat_mag;
|
||||
else
|
||||
w_hat = 0.0;
|
||||
w_hat = zero;
|
||||
|
||||
auto Reff = (Ri*Rj)/(Ri+Rj);
|
||||
|
||||
|
Reference in New Issue
Block a user