Discretization of the divergence operator

Click For Summary
SUMMARY

The discussion focuses on the discretization of the divergence operator for a grid-based code used to compute the divergence of a velocity field in an incompressible fluid. The method involves calculating the net fluid flow through the faces of cubical regions defined on a mesh, using the velocity vectors of neighboring cells. The divergence is determined by averaging the contributions from each face, where the relevant quantity is derived from the dot product of the velocity vector and the outward normal vector of the face. This approach ensures accurate representation of fluid dynamics under the assumption of incompressibility.

PREREQUISITES
  • Understanding of grid-based computational methods
  • Familiarity with fluid dynamics, specifically incompressible fluid behavior
  • Knowledge of vector calculus, particularly dot products and normal vectors
  • Experience with numerical methods for discretization
NEXT STEPS
  • Research methods for implementing finite volume discretization techniques
  • Explore numerical stability considerations in fluid dynamics simulations
  • Learn about the application of the divergence theorem in computational fluid dynamics
  • Investigate software tools for simulating incompressible flow, such as OpenFOAM
USEFUL FOR

This discussion is beneficial for computational fluid dynamicists, numerical analysts, and software developers working on simulations of incompressible fluids, particularly those utilizing grid-based methods for velocity field analysis.

matteo86bo
Messages
56
Reaction score
0
I work with a grid-based code, this means that all of my quantities are defined on a mesh. I need to compute, for every point of the mesh the divergence of the velocity field.
All I have is, for every cell of my mesh, the values of the 3-d velocity in his 26 neighbors.
I call neighbors the cells with center (i,j,k) with i,j,k=-1,0,1 and (0,0,0) being the center of the cell.
What's the best discretization of the divergence operator under these assumptions?
 
Physics news on Phys.org
Well I assume you must be dealing with something like an incompressible fluid if the only parameter you need to use is the velocity.

For an incompressible fluid, the divergence of a point measures the net amount of fluid coming out of that point, so unless there is a "source" or "sink" of fluid in that region, then there is no divergence. If you discretize the fluid into cubical regions, where each cube has a given velocity vector, then you can simply calculate the volume of fluid each cube sends through each of its square faces. If a given face separates cubes A and B, then the relevant quantity for that face is (volume A sends through face)+(volume B sends through face). The volume of incompressible fluid passing through the face is equal to the dot product of the velocity vector with the surface's normal vector (oriented outwards from the core of the cube). If, for example, the face separating cubes A and B is parallel to the y-z plane, then the normal vector is \hat{\mathbf{x}} for cube A and -\hat{\mathbf{x}} for cube B, so the relevant quantity for the face is \mathbf{v_A}\cdot\hat{\mathbf{x}}-\mathbf{v_B}\cdot\hat{\mathbf{x}}. So to get a measure of the divergence for an entire cube, you might average the six values for each of the faces.
 
Relativistic Momentum, Mass, and Energy Momentum and mass (...), the classic equations for conserving momentum and energy are not adequate for the analysis of high-speed collisions. (...) The momentum of a particle moving with velocity ##v## is given by $$p=\cfrac{mv}{\sqrt{1-(v^2/c^2)}}\qquad{R-10}$$ ENERGY In relativistic mechanics, as in classic mechanics, the net force on a particle is equal to the time rate of change of the momentum of the particle. Considering one-dimensional...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
13K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
6
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K