Hi all,
I have some news on this issue :-)
I finished the preliminary implementation of the vertex divergence projection filter as well as the modified projection, as proposed in the document I provide you.
By the way, there were two small errors in the document so here is an updated version
I provide a patch for the implementation, which may require reviews because maybe some steps can be simplified/optimized..
Here is a brief description of what I did:
Vertex divergence filter (GfsEventVertexDivFilter):
- Implemented as an event
- Executed at each event_do
- Uses a regular 3x3x3 stencil
- Store gradient of velocity in order to compute values at virtual finer cells
- Filtering deactivated at corner boundaries
- If volume source present (as a GfsVariablePoissonDivergent, see below), remove the divergent part of the velocity before filtering
- Does not consider metrics (should not be important) and "alpha" (did not check influence yet)
Modified projection and volume source implementation (GfsVariablePoissonDivergent):
- Implemented using a new variable derived from GfsVariablePoisson
- GfsSimulation modified so that the Poisson equation for the potential is solved at the right moment
- GfsSimulation modified in order to correct the velocity field before the approximate projection
- The mac projection is not modified (uses gfs_divergent_hook to add the volume source)
- Need at least one boundary with Dirichlet condition for the potential otherwise does not converge
I made some tests using a sharp volume source (band of 1 cell thickness) and the results are identical to the results obtained from the 1D code in MATLAB (see document).
Which is very promising for MassTransfer simulation (at least I hope so..).
I still need to do some further tests on sharp sources to see if this is working properly and stable (2D, 3D and unsteady sources...)
Regarding 2D test, I re-used the already existing one (cylinder source in the test-case list). I changed the time-step to 0.0001 so that the instabilities observed by Daniel appear.
I computed analytically the theoretical pressure considering the volume source and added the related ErrorNorm and pressure distribution plots to the case.
I made another parameter file in which the filtering is used and put it in a sub-folder "./filtered" in a similar manner as for the Reynolds test-case.
Briefly, the pressure distribution in the filtered case is very clean, without oscillations.
Here is a series of commands you can use to run the test case
tar -zxvf source.tar.gz
cd source
sh source.sh source.gfs
cd filtered
sh ../source.sh filtered.gfs
I also provide a preview of the pressure distributions obtained with and without filtering so that you can see the improvements.
Any feedback on this is welcome! thanks
I will now have a look to the transport of the interface.
Cheers,
Gael