Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for hyperbolic-parabolic systems to TreeMesh2D (#1156)
* Add prototype for advection-diffusion elixir for TreeMesh2D * Initial implementation of `calc_gradient!` for TreeMesh{2} * First complete implementation of the parabolic rhs operator for TreeMesh * Make it work * Add first elixir that works * Clean up elixir * first draft of container for Navier-Stokes constants and fluxes * remove unneeded temperature computation * draft of elixir with possible boundary condition structure * added manufactured solution and source term * fix typo in function name for MMS * update variable names for consistency. improve comments * fix dumb typos in new equation system name * actually export new equations * add comment near variable_mapping declaration. * Apply suggestions from code review Co-authored-by: Hendrik Ranocha <[email protected]> * parabolic equations now exported separately * change name to CompressibleNavierStokesEquations2D * export NS with proper name * explicitly require compressible Euler in the type parameter * name kinematic viscosity nu for consistency with Lattice-Boltzmann * add promotion in constructor * make Reynolds, Prandtl, Mach, and kappa keyword arguments * update constructor call in elixir * reduce computation by exploiting stress tensor symmetry * fix unpacking of flux * modifying parabolic cache creation in cache, we assume we take the gradient of all hyperbolic variables. since the number of parabolic variables can differ from the number of hyperbolic variables, we pass in the hyperbolic equations to `create_cache_parabolic` now * comments * comments * formatting and renaming equations to equations_hyperbolic formatting comments * fix unpacking of gradients in flux * adding CNS BCs * adding lid-driven cavity elixir * adding variable transform, editing cons2prim for CNS * add prim2cons for NS (inconsistent right now) * add draft of DGMulti Navier Stokes convergence elixir * converging solution using elixir for TreeMesh with BCs * fixing DGMulti advection diffusion elixir convergence * naming equations as parabolic/hyperbolic * generalizing transform_variables * add TODO more todos * additional checks on get_unsigned_normal * adding isothermal BC * commenting out unused CNS functions for now * fix call to transform_variables * comments and cleanup * changing default solver and Re for cavity * adding more advection diffusion tests * label tests * add gradient_variables field to SemidiscretizationHyperbolicParabolic * Revert "add gradient_variables field to SemidiscretizationHyperbolicParabolic" This reverts commit 063b602. * allowing for specialization in transform_variables adding a function `gradient_variable_transformation` which should get specialized if the gradient variables are not conservative variables * formatting and comments * reverting elixir * comments * standardizing time tol * minor fix to CNS boundary flux for convenience make it so that the density state is computed correctly, even though it's not used * formatting + comments * using primitive variables in viscous flux instead of conservative * minor formatting * add CNS tests * fix test * testing if scoping issues fix TreeMesh tests * decreasing timestep tol for TreeMesh parabolic test * enabling periodic BCs for TreeMesh + more tests * fix density BC flux (unused, but could be useful) * adding non-working TreeMesh elixirs * adding AD checks * standardizing parameters in convergence elixirs * minor cleanup * revert DGMulti CNS elixir setup back to the one used in tests * adding TreeMesh CNS convergence test * removing redundant elixir * add more tests * add more test * Apply suggestions from code review Co-authored-by: Hendrik Ranocha <[email protected]> * set version to v0.4.43 * set development version to v0.4.44-pre * add YouTube links to JuliaCon presentations (#1192) * add YouTube links to JuliaCon presentations * Apply suggestions from code review Co-authored-by: Michael Schlottke-Lakemper <[email protected]> Co-authored-by: Michael Schlottke-Lakemper <[email protected]> * improved readability of equation docstrings in compressible Euler files * Navier-Stokes in 2D on DGMulti and TreeMesh (#1165) * first draft of container for Navier-Stokes constants and fluxes * remove unneeded temperature computation * draft of elixir with possible boundary condition structure * added manufactured solution and source term * fix typo in function name for MMS * update variable names for consistency. improve comments * fix dumb typos in new equation system name * actually export new equations * add comment near variable_mapping declaration. * Apply suggestions from code review Co-authored-by: Hendrik Ranocha <[email protected]> * parabolic equations now exported separately * change name to CompressibleNavierStokesEquations2D * export NS with proper name * explicitly require compressible Euler in the type parameter * name kinematic viscosity nu for consistency with Lattice-Boltzmann * add promotion in constructor * make Reynolds, Prandtl, Mach, and kappa keyword arguments * update constructor call in elixir * reduce computation by exploiting stress tensor symmetry * fix unpacking of flux * modifying parabolic cache creation in cache, we assume we take the gradient of all hyperbolic variables. since the number of parabolic variables can differ from the number of hyperbolic variables, we pass in the hyperbolic equations to `create_cache_parabolic` now * comments * comments * formatting and renaming equations to equations_hyperbolic formatting comments * fix unpacking of gradients in flux * adding CNS BCs * adding lid-driven cavity elixir * adding variable transform, editing cons2prim for CNS * add prim2cons for NS (inconsistent right now) * add draft of DGMulti Navier Stokes convergence elixir * converging solution using elixir for TreeMesh with BCs * fixing DGMulti advection diffusion elixir convergence * naming equations as parabolic/hyperbolic * generalizing transform_variables * add TODO more todos * additional checks on get_unsigned_normal * adding isothermal BC * commenting out unused CNS functions for now * fix call to transform_variables * comments and cleanup * changing default solver and Re for cavity * adding more advection diffusion tests * label tests * add gradient_variables field to SemidiscretizationHyperbolicParabolic * Revert "add gradient_variables field to SemidiscretizationHyperbolicParabolic" This reverts commit 063b602. * allowing for specialization in transform_variables adding a function `gradient_variable_transformation` which should get specialized if the gradient variables are not conservative variables * formatting and comments * reverting elixir * comments * standardizing time tol * minor fix to CNS boundary flux for convenience make it so that the density state is computed correctly, even though it's not used * formatting + comments * using primitive variables in viscous flux instead of conservative * minor formatting * add CNS tests * fix test * testing if scoping issues fix TreeMesh tests * decreasing timestep tol for TreeMesh parabolic test * enabling periodic BCs for TreeMesh + more tests * fix density BC flux (unused, but could be useful) * adding non-working TreeMesh elixirs * adding AD checks * standardizing parameters in convergence elixirs * minor cleanup * revert DGMulti CNS elixir setup back to the one used in tests * adding TreeMesh CNS convergence test * removing redundant elixir * add more tests * add more test * Apply suggestions from code review Co-authored-by: Hendrik Ranocha <[email protected]> * add docstrings Co-authored-by: Hendrik Ranocha <[email protected]> Co-authored-by: Hendrik Ranocha <[email protected]> Co-authored-by: Jesse Chan <[email protected]> * add docstring for CNS equations * removing some addressed TODOs * adjust definition of the kappa constant * avoid overwriting u_grad with viscous_flux results * remove old TODOs * clarify TODOs for later * removing let statements * rearrange main docstring. Fix typos in math environment causing it to not parse * update TODO notes * Apply suggestions from code review Co-authored-by: Andrew Winters <[email protected]> * update TODO notes * Apply suggestions from code review Co-authored-by: Andrew Winters <[email protected]> * update TODO notes * changing diffusivity names Auto stash before merge of "parabolic-treemesh" and "origin/parabolic-treemesh" * Reynolds/Prandtl number name changes for consistency * Apply suggestions from code review Co-authored-by: Hendrik Ranocha <[email protected]> Co-authored-by: Michael Schlottke-Lakemper <[email protected]> Co-authored-by: Andrew Winters <[email protected]> * fixing bug introduced by GH code review * moving manufactured solution into the CNS equations file * fix allocation issue * get_diffusivity -> diffusivity * removing cruft code, adding comment on messy prim2cons routine * moving manufactured solution back into elixirs * Update examples/dgmulti_2d/elixir_advection_diffusion_nonperiodic.jl * TODO -> Todo, and .6 -> 0.6 d * Update src/solvers/dgsem_tree/dg_2d_parabolic.jl Co-authored-by: Hendrik Ranocha <[email protected]> * adding note to Adiabatic/Isothermal BCs * replacing CompressibleNavierStokesEquations with ...Diffusion * Update src/solvers/dgsem_tree/dg_2d_parabolic.jl Co-authored-by: Hendrik Ranocha <[email protected]> * Update src/solvers/dgsem_tree/dg_2d_parabolic.jl Co-authored-by: Hendrik Ranocha <[email protected]> * documenting Jacobian sign flip * remove extra arg to `gradient_variable_transformation` * Update src/solvers/dgsem_tree/dg_2d_parabolic.jl Co-authored-by: Michael Schlottke-Lakemper <[email protected]> * change warning to error * fix bug introduced by search/replace * dg_parabolic -> parabolic_scheme * BoundaryConditionViscousWall -> BoundaryConditionNavierStokesWall * u_grad -> gradients * fix test * renaming * update comment * converting to signature `flux(u, gradients, orientation, equations)` * using prolong2interfaces/boundaries * unpacking `gradients` and `flux_viscous` * using calc_surface_integral! * adding @muladd * Apply suggestions from code review * update comments * Rename grad_u -> gradients * Update src/equations/compressible_navier_stokes_2d.jl Co-authored-by: Michael Schlottke-Lakemper <[email protected]> * Rename remaining grad_u/u_grad -> gradients * Refactor into prolong2interfaces! * Refactor calc_volume_integral! * Refactor calc_interface_flux * Refactor prolong2boundaries! * Refactor calc_divergence! * Formatting consistency * Remove dispatch on volume integral type * Add comment on why surface_integral is passed to prolong2interfaces! * Explicitly use weak form volume integral to allow easy overriding in test * Add flux differencing test for CNS test * Remove erroneous P4estMesh{2} dispatch * Remove non-cons terms from parabolic solver Co-authored-by: Andrew Winters <[email protected]> Co-authored-by: Hendrik Ranocha <[email protected]> Co-authored-by: Hendrik Ranocha <[email protected]> Co-authored-by: Jesse Chan <[email protected]> Co-authored-by: Jesse Chan <[email protected]>
- Loading branch information