AMReX-FHD / FHDeX

AMReX-enabled code libraries for stochastic hybrid models and algorithms for fluids
Other
10 stars 14 forks source link

Boundary Issues in the Cell-Centered Compressible FHD #126

Open isriva opened 2 years ago

isriva commented 2 years ago

The cell-centered code for compressible FHD has several outstanding issues listed below. A major re-factor of the code was performed in Feb 2022 for a better prescription of the Dirichlet boundary conditions in the PR https://github.com/AMReX-FHD/FHDeX/pull/98. In this PR, Dirichlet boundary conditions are assigned at the boundaries rather than a linear extrapolation to ghost cells for increased numerical stability. However several issues have emerged, both after the PR (post-Feb version) and before the PR (pre-Feb version)

  1. Pre-Feb version: A binary mixture of gases at equilibrium confined between isothermal, no-slip walls exhibit incorrect density and energy variance in the boundary cells. When slip walls are used, all variances appear to be correct (see attached pdf file, and attached inputs file for testing). 0328MON_sim_res_pre-Feb_version.pdf and inputs_cell_cent_test.txt
  2. Post-Feb version: For the similar setup as above, incorrect variances are observed for both slip and no-slip boundaries, with the results being much worse than the Pre-Feb version.
  3. Revisit the treatment of energy fluxes at the walls. A previous PR (https://github.com/AMReX-FHD/FHDeX/pull/37) addressed this issue by separately treating the various contributions (heat, Dufour, and viscous heating) at the walls.
isriva commented 1 year ago

@jbbel I have started this branch to check for the errors associated with boundary conditions in cell-centered compressible FHD: https://github.com/AMReX-FHD/FHDeX/tree/fix_compres_center

isriva commented 1 year ago

The error appears to be at the high boundary (in all directions). Here is an example of the error: local density variance in an equilibrium simulation. rhoVar

jbbel commented 1 year ago

do you view noslip at left boundary as ok? also do we see same behavior with adiabatic

isriva commented 1 year ago

The behavior is the same with adiabatic. I think the no-slip is ok on the left (the difference could be in the noise -- but I will check closely).

jbbel commented 1 year ago

i believe I have identified the issue and fixed the problem. at least for noslip isothermal walls in z direction things seem to be correct

isriva commented 1 year ago

The issue above seems to be fixed, but the variance for density (and also energy) seem incorrect for noslip -- looks like it is correct for slip -- see below ... rhovar