Velocity Divergence

Provides a system for patient-specific cardiovascular modeling and simulation.
POST REPLY
User avatar
Moses Hamm
Posts: 10
Joined: Sun Dec 04, 2022 10:44 pm

Velocity Divergence

Post by Moses Hamm » Tue May 30, 2023 6:29 pm

Hi,
I have been running laminar blood flow simulations using incrementally smaller time steps in order to verify simulation convergence. The residuals and Courant numbers suggest that the simulations did indeed converge. However, when I analyzed the results in paraview, I found that the divergence of the velocity field is non-zero despite blood being an incompressible fluid. I attached example results from simulations with different time step lengths which show patterns of divergence in the peak systolic flow. Any ideas on why this is happening and how to fix it?
time_sweep_divergence.png
time_sweep_divergence.png (393.7 KiB) Viewed 369 times

User avatar
David Parker
Posts: 1761
Joined: Tue Aug 23, 2005 2:43 pm

Re: Velocity Divergence

Post by David Parker » Tue May 30, 2023 8:22 pm

Hello,

Which solver are you using? How are you computing the divergence of the velocity field?

Cheers,
Dave

User avatar
Moses Hamm
Posts: 10
Joined: Sun Dec 04, 2022 10:44 pm

Re: Velocity Divergence

Post by Moses Hamm » Tue May 30, 2023 9:03 pm

I am using the 2022-08-19 Windows version of the svSolver and Paraview version 5.10.0. Paraview has a filter that computes the gradient, divergence, and vorticity of the velocity from the point data in the vtu output files.

I did some more digging. I downloaded the example project from https://simtk.org/frs/?group_id=930 and computed the divergence the same way. This also showed non-zero divergence. I attached images showing this.
example_divergence.png
example_divergence.png (273.36 KiB) Viewed 312 times
example_divergence_2.png
example_divergence_2.png (178.27 KiB) Viewed 312 times

User avatar
David Parker
Posts: 1761
Joined: Tue Aug 23, 2005 2:43 pm

Re: Velocity Divergence

Post by David Parker » Wed May 31, 2023 2:36 pm

Hello,

Computing divergence point-wise at element nodes is of course a local approximation. A fine enough mesh resolution and properly converged simulation results will reduce the error of the approximation. The Demo simulation results are not very good, residual around 1e-02, should be around 1e-03.

You should also look at the results in the mesh interior where the divergence computations are better averaged.

Cheers,
Dave

User avatar
Moses Hamm
Posts: 10
Joined: Sun Dec 04, 2022 10:44 pm

Re: Velocity Divergence

Post by Moses Hamm » Wed May 31, 2023 5:15 pm

Hi Dave,

The interior results for the demo seem to be similar. The original results I posted are also interior snapshots btw.

It makes a bit more sense knowing that it's just an approximation. Is there a better method for computing the divergence that you suggest using?

Thanks,
Moses
Attachments
example_divergence_3.png
example_divergence_3.png (163.08 KiB) Viewed 289 times

User avatar
David Parker
Posts: 1761
Joined: Tue Aug 23, 2005 2:43 pm

Re: Velocity Divergence

Post by David Parker » Wed May 31, 2023 9:04 pm

Hi Moses,

Like I said before the simulation results for the Demo project are not very good because the solution does not converge.

If you look at the models in the VMR (https://www.vascularmodel.com/) you should see better values for the divergence.

Using shape function derivatives like Paraview does is the easiest way to compute divergence. However, in the FE formulation the continuity equation is satisfied in a weak (integral) sense. To get smother more accurate values you would need to perform an L2 projection which would require solving a system of equations.

Why are you so interested in divergence?

Cheers,
Dave

User avatar
Moses Hamm
Posts: 10
Joined: Sun Dec 04, 2022 10:44 pm

Re: Velocity Divergence

Post by Moses Hamm » Wed May 31, 2023 9:59 pm

Dave,

I don't necessarily care about divergence. I'm verifying simulation results, and divergence initially seemed like a simple way to check the physical consistency of the results. I stumbled across this issue, and didn't just want to ignore it. I'm now trying to gauge whether the results are actually no good, or whether this is a non-issue.

Thanks,
Moses

POST REPLY