Bug corrected in AdvectionReaction solver

Clearly defined bug reports and their fixes
Post Reply
gagliar
Posts: 79
Joined: 04 Sep 2009, 16:34
Location: LGGE - Grenoble
Contact:

Bug corrected in AdvectionReaction solver

Post by gagliar »

Hello,

I have corrected a bug in the AdvectionReaction (version 6431, 15/11/2013). There was a missing term in the ALE formulation of the advectionreaction solver (should modify results if you have non-zero mesh velocity). See explanations below.

The AdvectionReaction solver solves the following equation
(1) dc/dt + div(c u) + gamma c = S
where
c is the scalar variable to be transported and u the fluid velocity vector.

For the ALE formulation, u was replaced by u* = u - v in (1), where v is the mesh velocity vector. In fact, only the velocity in the transport term should account for the mesh velocity, i.e. (1) should be written:
dc/dt + u* . grad(c) + c div(u) + gamma c = S

After integrating by part the second term, the variational formulation to be solved is then:
dc/dt Phi - c grad(Phi).u* + c div(v) Phi + gamma c Phi = S Phi - (c Phi u*.n)

The third term c div(v) Phi was missing and has been added in version 6431.

Regards
Olivier
Post Reply