3540
|
|
This commit brings the possibility to have the pressure field on a discontinuous (DG) mesh. This will currently only work in combination with a continuous (CG) velocity.
Turns out the assembly code already more or less supported this. Only the sparsity of the resulting C^TM^{-1}C matrix came out wrong. The appropriate "discontinuous_galerkin" option has been added under scalar_field::Pressure/prognostic/spatial_discretisation/ so we don't have to lie, and the removing the possibility of integrating continuity by parts (which is not a good idea with a dg pressure).
Viable element pairs with a cg velocity and dg pressure are limited in number. This option is however still useful for numerical investigations and will (hopefully) become useful in combination with ongoing compressible developments.
To test the functionality: -- switch shocktube_1d_expl to use P1P0 element pair (in 1d this is simple staggering) -- add a Q1P0 Stokes mms test case. Q1P0 is actually unstable and a pressure filter would have to be implemented to make practical use of this. The pressure modes clearly visible in this test case do however not influence the convergence rate of velocity in this case. -- add a P2P0 steady state Navier Stokes mms using full projection. This also works with a lumped velocity mass, however we then need the P2 submesh trick, and convergence to steady state seems very slow.
Changes in detail: * femtools/Sparse_Matrices_Fields.F90: mult_div_vector_div_t(), the "workhorse" of assembling cmc_m, is cleaned up a bit as it used to give the wrong answer if a too large cmc sparsity was provided. The dg cmc sparsity however has now been fixed, to not be too large. * femtools/Sparsity_Patterns.F90: The most controversial change: the sparsity in make_sparsity_lists() no longer contains extra entries connecting all rows associated with an element to columns associated with dg nodes on the outside of that element if only the column mesh is dg. If the row mesh is cg, this means a cg row is no longer connected to dg nodes on the outside of the faces that the cg node is not located on. If both row and column mesh are dg, nothing changes. This change is necessary to avoid an almighty big stencil of C^TM^{-1}C with dg pressure (it will in general already be rather big as it is). * assemble/Compressible_Projection.F90: Add an options check to not use a dg pressure with the compressible projection step. This has not been implemented, but will work the "prognostic momentum" approach (yet to be merged). * assemble/Momentum_CG.F90 Change the logicals 'assemble_ct_matrix' and 'cg_pressure' that are now no longer appropriate into 'assemble_ct_matrix_here' and 'include_pressure_and_continuity_bcs' that are a bit more descriptive of what they actually switch on/off. * assemble/Momentum_DG.F90 Similarly, change 'cg_pressure' into 'include_pressure_bcs' * assemble/Momentum_Equation.F90 Remove cg_pressure, as this actually just meant .not. cv_pressure. The above logic about whether to assemble (bits of) ct_m and pressure and continuity bcs is now determined in the calls to momentum_cg() and momentum_dg() instead of hidden therein. Add options check to not use dg pressure with dg velocity.
|
Stephan Kramer |
12 years ago
|
|
|