Skip to content

Commit

Permalink
Change how the pressure is calculated in function Advance to explore …
Browse files Browse the repository at this point in the history
…kinematic BC
  • Loading branch information
JMQuinlan committed Dec 13, 2024
1 parent b1d8db0 commit 3e558f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion input.NormalIntoWall
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ density.ic.type = expression
density.ic.expression.region0 = "100.0"

velocity.ic.type = expression
velocity.ic.expression.region0 = "1.0" #"1.0 * (0.5*tanh((4.0-x)/0.05) + 0.5)"
velocity.ic.expression.region0 = "1.0 * (0.5*tanh((4.0-x)/0.05) + 0.5)"
velocity.ic.expression.region1 = "0.0"

pressure.ic.type = expression
Expand Down
8 changes: 4 additions & 4 deletions input.VonKarman
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ amr.plot_dt = 1.0
#amr.plot_int = 10
amr.max_grid_size = 500000
amr.blocking_factor = 8
amr.regrid_int = 100
amr.regrid_int = 20
amr.grid_eff = 0.8


Expand All @@ -34,7 +34,7 @@ geometry.is_periodic = 0 0 0

### TIME STEP ###

stop_time = 10000.0
stop_time = 6000.0

### ETA IC ###

Expand Down Expand Up @@ -113,10 +113,10 @@ pf.eta.bc.val.zhi = 0.0
### HYDRO BC ###

density.bc.type.xhi = neumann
density.bc.type.xlo = neumann
density.bc.type.xlo = dirichlet
density.bc.type.ylo = neumann
density.bc.type.yhi = neumann
density.bc.val.xhi = 0.0
density.bc.val.xhi = 100.0
density.bc.val.xlo = 0.0
density.bc.val.ylo = 0.0
density.bc.val.yhi = 0.0
Expand Down
6 changes: 5 additions & 1 deletion src/Integrator/Hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,11 @@ void Hydro::Advance(int lev, Set::Scalar time, Set::Scalar dt)
v(i,j,k,0) = etaM_fluid(0) / (etarho_fluid + small);
v(i,j,k,1) = etaM_fluid(1) / (etarho_fluid + small);

p(i,j,k) = (etaE_fluid - 0.5 * (etaM_fluid(0)*etaM_fluid(0) + etaM_fluid(1)*etaM_fluid(1)) / (etarho_fluid + small)) * ((gamma - 1.0) * (eta(i, j, k) + small));
// p(i,j,k) = (etaE_fluid - 0.5 * (etaM_fluid(0)*etaM_fluid(0) + etaM_fluid(1)*etaM_fluid(1)) / (etarho_fluid + small)) * ((gamma - 1.0) * (eta(i, j, k) + small));
// p(i,j,k) = (etaE_fluid*etarho_fluid - 0.5 * (etaM_fluid(0)*etaM_fluid(0) + etaM_fluid(1)*etaM_fluid(1)) / (etarho_fluid + small)) * ((gamma - 1.0) * (eta(i, j, k) + small));
// p(i,j,k) = (etaE_fluid*etarho_fluid / (eta(i, j, k) + small) - 0.5 * (etaM_fluid(0)*etaM_fluid(0) + etaM_fluid(1)*etaM_fluid(1)) / (etarho_fluid + small)) * ((gamma - 1.0) / (eta(i, j, k) + small));
p(i,j,k) = (etaE_fluid*etarho_fluid / (eta(i, j, k) + small) - 0.5 * (etaM_fluid(0)*etaM_fluid(0) + etaM_fluid(1)*etaM_fluid(1)) / (etarho_fluid + small)) * ((gamma - 1.0) / (eta(i, j, k) + small))-pref;
// p(i,j,k) = (etaE_fluid * etarho_fluid - 0.5 * (etaM_fluid(0)*etaM_fluid(0) + etaM_fluid(1)*etaM_fluid(1)) / (etarho_fluid + small) *eta(i, j, k) )*((gamma - 1.0) / (eta(i, j, k) + small));
});
}

Expand Down

0 comments on commit 3e558f3

Please sign in to comment.