From fa9a7b5db47037abbe5ecf41dd7d9c57104dcda3 Mon Sep 17 00:00:00 2001 From: James Wright Date: Tue, 5 Mar 2024 09:19:29 -0700 Subject: [PATCH 1/2] fix(fluids): RHS stabilization term should be negative --- examples/fluids/qfunctions/advection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/fluids/qfunctions/advection.h b/examples/fluids/qfunctions/advection.h index bb8b205674..e4f4015537 100644 --- a/examples/fluids/qfunctions/advection.h +++ b/examples/fluids/qfunctions/advection.h @@ -391,7 +391,7 @@ CEED_QFUNCTION_HELPER void RHSFunction_AdvectionGeneric(void *ctx, CeedInt Q, co break; case STAB_SU: case STAB_SUPG: - grad_v[j][4][i] += wdetJ * TauS * strong_conv * uX[j]; + grad_v[j][4][i] -= wdetJ * TauS * strong_conv * uX[j]; break; } } From f07714d9267ae37c0c844e07b7f7e93ea3da4ade Mon Sep 17 00:00:00 2001 From: James Wright Date: Tue, 5 Mar 2024 10:06:00 -0700 Subject: [PATCH 2/2] test(fluids): Add stabilized explicit test for advection Also uses consistent mass matrix --- examples/fluids/navierstokes.c | 1 + ...rotation-explicit-stab-su-consistent-mass.bin | Bin 0 -> 1792 bytes 2 files changed, 1 insertion(+) create mode 100644 examples/fluids/tests-output/fluids-navierstokes-adv2d-rotation-explicit-stab-su-consistent-mass.bin diff --git a/examples/fluids/navierstokes.c b/examples/fluids/navierstokes.c index e125c223d0..bafe7212ab 100644 --- a/examples/fluids/navierstokes.c +++ b/examples/fluids/navierstokes.c @@ -18,6 +18,7 @@ // ./navierstokes -ceed /cpu/self -problem density_current -degree 1 // ./navierstokes -ceed /gpu/cuda -problem advection -degree 1 // +//TESTARGS(name="Advection 2D, rotation, explicit, su, consistent mass") -ceed {ceed_resource} -test_type solver -problem advection -degree 3 -dm_plex_box_faces 2,2 -dm_plex_box_lower 0,0 -dm_plex_box_upper 125,125 -bc_wall 1,2,3,4 -wall_comps 4 -units_kilogram 1e-9 -rc 100. -ts_dt 1e-3 -ts_max_steps 10 -stab su -Ctaus 0.5 -mass_ksp_type cg -mass_pc_jacobi_type diagonal -compare_final_state_atol 1e-10 -compare_final_state_filename examples/fluids/tests-output/fluids-navierstokes-adv2d-rotation-explicit-stab-su-consistent-mass.bin //TESTARGS(name="Advection, skew") -ceed {ceed_resource} -test_type solver -options_file examples/fluids/advection.yaml -ts_max_steps 5 -wind_type translation -wind_translation -0.5547002,0.83205029,0 -advection_ic_type skew -dm_plex_box_faces 2,1,1 -degree 2 -stab supg -stab_tau advdiff_shakib -Ctau_a 4 -ksp_type gmres -compare_final_state_atol 5e-10 -compare_final_state_filename examples/fluids/tests-output/fluids-navierstokes-adv-skew.bin //TESTARGS(name="Blasius, bc_slip") -ceed {ceed_resource} -test_type solver -options_file examples/fluids/blasius.yaml -ts_max_steps 5 -dm_plex_box_faces 3,20,1 -platemesh_nDelta 10 -platemesh_growth 1.2 -bc_outflow 5 -bc_slip 4 -compare_final_state_atol 2E-11 -compare_final_state_filename examples/fluids/tests-output/fluids-navierstokes-blasius-bc_slip.bin //TESTARGS(name="Blasius, SGS DataDriven Sequential") -ceed {ceed_resource} -options_file examples/fluids/tests-output/blasius_stgtest.yaml -sgs_model_type data_driven -sgs_model_dd_leakyrelu_alpha 0.3 -sgs_model_dd_parameter_dir examples/fluids/dd_sgs_data -ts_dt 2e-9 -state_var primitive -ksp_rtol 1e-12 -snes_rtol 1e-12 -stg_mean_only -stg_fluctuating_IC -test_type solver -compare_final_state_atol 1e-10 -compare_final_state_filename examples/fluids/tests-output/fluids-navierstokes-blasius-sgs-data-driven.bin -sgs_model_dd_use_fused false diff --git a/examples/fluids/tests-output/fluids-navierstokes-adv2d-rotation-explicit-stab-su-consistent-mass.bin b/examples/fluids/tests-output/fluids-navierstokes-adv2d-rotation-explicit-stab-su-consistent-mass.bin new file mode 100644 index 0000000000000000000000000000000000000000..64b6150bb719239b8b1e7c34ff31b415b0b7b4ee GIT binary patch literal 1792 zcmd;ici)JCfq}~*sp&##21^ZtP_-YBf7kv4kOTtzJ0EwSJ^d?aKa_@u0>uv;QmRgG zZ$MKQxc`_;M@j~F09@Vm(<>Jq@$ae=9WnTO%7bF+gtnRD)kse^?(hWlXQ3rQy|816!qXTWd|syqvZ zJD~DV@er6h;QoWjL*oUPJk(tgIOQSv4yQcKewe*5+Wy*q@6hd@XJFw3^qJ;PD7^52`9)z3}qatpA>$5ak-wT^Qy)iq4Gdz3BkA7osl29#=kxh7VMp T1!gZyKg>P2^h4u40$o1