[Gfs-devel] implementation of conservative momentum
Brought to you by:
popinet
From: Daniel F. <df...@gm...> - 2008-08-07 14:20:28
|
Hello Stephane Thank you very much for your comments and advice. I think I will need some help, mainly at the beginning. I have been looking into that and I have some "technical" problems. As you told me, I am starting with the inviscid pure gravity wave. Thus, the only subroutine that I have to modify is variable_sources (in timestep.c) Basically, the first step that I take is to change the values of GfsAdvectionParams * par ->v by the momentum GfsAdvectionParams * par ->v = par ->v * rho I understand that doing that, gfs_cell_advected_face_values automatically advects v*rho without introducing any other modification in the code. That is, it gives me (v rho)* Then, I work out rho*. To do that, I use the gfs_tracer_vof_advection function applied to the tracer variable. In principle, my idea is then to write u*=(rho u)*/u* in the same place where u* is written in the original gerris (somewhere inside the cell structure). I think that if I do that I would have advected the momentum and I won't have to change anything else in the code (not even gfs_face_velocity_advection_flux). However, I have a small problem: When I apply gfs_tracer_vof_advection, it overwrites the values of rho* over the values of (rho*v)* (and then I cannot calculate u* because I have missed (rho*v)* :-[ ) I have two questions: 1) How can I easily store the face values worked out from gfs_cell_advected_face_values? I am thinking in creating directly another function similar to gfs_tracer_vof_advection which directly returns u* at the faces (instead of rho*). However, I do not have clear if this is the best solution, in the end, the subroutine would be almost identical than that which is already created. 2) Do you think I am doing something wrong? I am not changing the gfs_face_velocity_advection_flux as you told me. Indeed, I am not completly sure that what I am doing is what you want. So tell me if you think I am missing something . Thanks again for your time. Daniel |