LBM parameters in TwoPhase
This commit is contained in:
parent
6d5732d66f
commit
23dd734a40
@ -144,7 +144,7 @@ TwoPhase::TwoPhase(std::shared_ptr <Domain> dm):
|
||||
{
|
||||
// If timelog is empty, write a short header to list the averages
|
||||
//fprintf(TIMELOG,"--------------------------------------------------------------------------------------\n");
|
||||
fprintf(TIMELOG,"time dEs "); // Timestep, Change in Surface Energy
|
||||
fprintf(TIMELOG,"time rn rw nun nuw Fx Fy Fz iftwn "); // Timestep, Change in Surface Energy
|
||||
fprintf(TIMELOG,"sw pw pn awn ans aws Jwn Kwn lwns cwns KNwns KGwns "); // Scalar averages
|
||||
fprintf(TIMELOG,"vawx vawy vawz vanx vany vanz "); // Velocity averages
|
||||
fprintf(TIMELOG,"vawnx vawny vawnz vawnsx vawnsy vawnsz ");
|
||||
@ -175,7 +175,7 @@ TwoPhase::TwoPhase(std::shared_ptr <Domain> dm):
|
||||
sprintf(LocalRankFilename,"%s%s","timelog.tcat.",LocalRankString);
|
||||
TIMELOG = fopen(LocalRankFilename,"a+");
|
||||
//fprintf(TIMELOG,"--------------------------------------------------------------------------------------\n");
|
||||
fprintf(TIMELOG,"time "); // Timestep, Change in Surface Energy
|
||||
fprintf(TIMELOG,"time rn rw nun nuw Fx Fy Fz iftwn ");; // Timestep,
|
||||
fprintf(TIMELOG,"sw pw pn awn ans aws Jwn Kwn lwns cwns KNwns KGwns "); // Scalar averages
|
||||
fprintf(TIMELOG,"vawx vawy vawz vanx vany vanz "); // Velocity averages
|
||||
fprintf(TIMELOG,"vawnx vawny vawnz vawnsx vawnsy vawnsz ");
|
||||
@ -308,6 +308,19 @@ void TwoPhase::Initialize()
|
||||
wwndnw = 0.0; wwnsdnwn = 0.0; Jwnwwndnw=0.0;
|
||||
}
|
||||
|
||||
void TwoPhase::SetParams(double rhoA, double rhoB, double tauA, double tauB, double force_x, double force_y, double force_z, double alpha)
|
||||
{
|
||||
Fx = force_x;
|
||||
Fy = force_y;
|
||||
Fz = force_z;
|
||||
rho_n = rhoA;
|
||||
rho_w = rhoB;
|
||||
nu_n = (tauA-0.5)/3.f;
|
||||
nu_w = (tauB-0.5)/3.f;
|
||||
gamma_wn = 5.796*alpha;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void TwoPhase::SetupCubes(Domain &Dm)
|
||||
{
|
||||
@ -1162,7 +1175,7 @@ void TwoPhase::NonDimensionalize(double D, double viscosity, double IFT)
|
||||
void TwoPhase::PrintAll(int timestep)
|
||||
{
|
||||
if (Dm->rank()==0){
|
||||
fprintf(TIMELOG,"%i %.5g ",timestep,dEs); // change in surface energy
|
||||
fprintf(TIMELOG,"%i %.5g %.5g %.5g %.5g %.5g %.5g %.5g %.5g ",timestep,rho_n,rho_w,nu_n,nu_w,Fx,Fy,Fz,gamma_wn);
|
||||
fprintf(TIMELOG,"%.5g %.5g %.5g ",sat_w,paw_global,pan_global); // saturation and pressure
|
||||
fprintf(TIMELOG,"%.5g %.5g %.5g ",awn_global,ans_global,aws_global); // interfacial areas
|
||||
fprintf(TIMELOG,"%.5g %.5g ",Jwn_global, Kwn_global); // curvature of wn interface
|
||||
@ -1189,7 +1202,7 @@ void TwoPhase::PrintAll(int timestep)
|
||||
else{
|
||||
sat_w = 1.0 - nwp_volume/(nwp_volume+wp_volume);
|
||||
|
||||
fprintf(TIMELOG,"%i ",timestep); // change in surface energy
|
||||
fprintf(TIMELOG,"%i %.5g %.5g %.5g %.5g %.5g %.5g %.5g %.5g ",timestep,rho_n,rho_w,nu_n,nu_w,Fx,Fy,Fz,gamma_wn);
|
||||
fprintf(TIMELOG,"%.5g %.5g %.5g ",sat_w,paw,pan); // saturation and pressure
|
||||
fprintf(TIMELOG,"%.5g %.5g %.5g ",awn,ans,aws); // interfacial areas
|
||||
fprintf(TIMELOG,"%.5g %.5g ",Jwn, Kwn); // curvature of wn interface
|
||||
|
@ -88,6 +88,11 @@ public:
|
||||
double efawns,efawns_global; // averaged contact angle
|
||||
double euler,Kn,Jn,An;
|
||||
double euler_global,Kn_global,Jn_global,An_global;
|
||||
|
||||
double rho_n, rho_w;
|
||||
double nu_n, nu_w;
|
||||
double gamma_wn;
|
||||
double Fx, Fy, Fz;
|
||||
|
||||
double Jwn,Jwn_global; // average mean curavture - wn interface
|
||||
double Kwn,Kwn_global; // average Gaussian curavture - wn interface
|
||||
@ -169,6 +174,7 @@ public:
|
||||
int GetCubeLabel(int i, int j, int k, IntArray &BlobLabel);
|
||||
void SortBlobs();
|
||||
void PrintComponents(int timestep);
|
||||
void SetParams(double rhoA, double rhoB, double tauA, double tauB, double force_x, double force_y, double force_z, double alpha);
|
||||
};
|
||||
|
||||
|
||||
|
@ -151,6 +151,8 @@ void ScaLBL_ColorModel::ReadInput(){
|
||||
CalcDist(Averages->SDs,id_solid,*Mask);
|
||||
|
||||
if (rank == 0) cout << "Domain set." << endl;
|
||||
|
||||
Averages->SetParams(rhoA,rhoB,tauA,tauB,Fx,Fy,Fz,alpha);
|
||||
}
|
||||
|
||||
void ScaLBL_ColorModel::AssignComponentLabels(double *phase)
|
||||
@ -553,6 +555,7 @@ void ScaLBL_ColorModel::Run(){
|
||||
tolerance = fabs(capillary_number - Ca) / capillary_number ;
|
||||
if (rank == 0) printf(" -- adjust force by %f \n ",tolerance);
|
||||
}
|
||||
Averages->SetParams(rhoA,rhoB,tauA,tauB,Fx,Fy,Fz,alpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user