Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix inputs_giantfluct_3d to work by ensuring bc YK's sum to 1 #174

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exec/compressible/inputs_giantfluct_3d
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

# Xk and Yk at the wall for Dirichlet (concentrations) - set one to zero
# Ordering: (species 1, x-dir), (species 2, x-dir), ... (species 1, y-dir), ...
bc_Yk_y_lo = 0.2 0.09316672 0.70683296 # lo BC
bc_Yk_y_hi = 0.3 0.40683328 0.29316704 # hi BC
bc_Yk_y_lo = 0.2 0.09316672 0.70683328 # lo BC
bc_Yk_y_hi = 0.3 0.40683328 0.29316672 # hi BC


13 changes: 13 additions & 0 deletions src_compressible_stag/boundaryStag.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ void SetupCWallStag() {
} else if (amrex::Math::abs(sumy-1) < 1.e-10) {
GetMolfrac(bc_Yk_x_lo,bc_Xk_x_lo);
}
else {
Abort("SetupCWallStag: lo-x; mass or mole fractions do not sum to 1");
}
}

if (bc_mass_lo[0] >= 3) {
Expand Down Expand Up @@ -69,6 +72,8 @@ void SetupCWallStag() {
GetMassfrac(bc_Xk_x_hi,bc_Yk_x_hi);
} else if (amrex::Math::abs(sumy-1) < 1.e-10) {
GetMolfrac(bc_Yk_x_hi,bc_Xk_x_hi);
} else {
Abort("SetupCWallStag: hi-x; mass or mole fractions do not sum to 1");
}
}

Expand Down Expand Up @@ -108,6 +113,8 @@ void SetupCWallStag() {
GetMassfrac(bc_Xk_y_lo,bc_Yk_y_lo);
} else if (amrex::Math::abs(sumy-1) < 1.e-10) {
GetMolfrac(bc_Yk_y_lo,bc_Xk_y_lo);
} else {
Abort("SetupCWallStag: lo-y; mass or mole fractions do not sum to 1");
}
}

Expand Down Expand Up @@ -146,6 +153,8 @@ void SetupCWallStag() {
GetMassfrac(bc_Xk_y_hi,bc_Yk_y_hi);
} else if (amrex::Math::abs(sumy-1) < 1.e-10) {
GetMolfrac(bc_Yk_y_hi,bc_Xk_y_hi);
} else {
Abort("SetupCWallStag: hi-y; mass or mole fractions do not sum to 1");
}
}

Expand Down Expand Up @@ -185,6 +194,8 @@ void SetupCWallStag() {
GetMassfrac(bc_Xk_z_lo,bc_Yk_z_lo);
} else if (amrex::Math::abs(sumy-1) < 1.e-10) {
GetMolfrac(bc_Yk_z_lo,bc_Xk_z_lo);
} else {
Abort("SetupCWallStag: lo-z; mass or mole fractions do not sum to 1");
}
}

Expand Down Expand Up @@ -223,6 +234,8 @@ void SetupCWallStag() {
GetMassfrac(bc_Xk_z_hi,bc_Yk_z_hi);
} else if (amrex::Math::abs(sumy-1) < 1.e-10) {
GetMolfrac(bc_Yk_z_hi,bc_Xk_z_hi);
} else {
Abort("SetupCWallStag: hi-z; mass or mole fractions do not sum to 1");
}
}

Expand Down