Hi guys. I wanna get the velocity of the previous and next cells and multiply them e.g:
is it possible in this code? thanks
get the velocity of previous and next cells
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4070
- Joined: Mon Feb 20, 2012 3:25 pm
Re: get the velocity of previous and next cells
Hello,
What do you consider "previous" and "next" cell in an unstructured mesh ?
For a 1-d mesh, you can use the mesh->i_face_cells (face -> cells adjacency array, see in Doxygen documentation) can help you access the adjacent cells. For more complex cases, tou can also access those cell's centers (in cs_glob_mesh_quantities->cell_cen) for additional tests/filtering.
Best regards,
Yvan
What do you consider "previous" and "next" cell in an unstructured mesh ?
For a 1-d mesh, you can use the mesh->i_face_cells (face -> cells adjacency array, see in Doxygen documentation) can help you access the adjacent cells. For more complex cases, tou can also access those cell's centers (in cs_glob_mesh_quantities->cell_cen) for additional tests/filtering.
Best regards,
Yvan
Re: get the velocity of previous and next cells
Thanks admin.
My grid is structured then hence the solver is unstructured you mean i have to get the values of left hand side -. right hand side by the coordinates of the cell and the distance between centers? That will be reallly time consuming and inaccurate
My grid is structured then hence the solver is unstructured you mean i have to get the values of left hand side -. right hand side by the coordinates of the cell and the distance between centers? That will be reallly time consuming and inaccurate
-
- Posts: 4070
- Joined: Mon Feb 20, 2012 3:25 pm
Re: get the velocity of previous and next cells
Hello,
You do not need the coordinates if the neighboring cells are sufficient. But they may help for example when you have 6 neighbors (in 3D) and need to know which is which. Because even if you grid is initially structured, it is internally handled as an unstructured grid.
Best regards,
Yvan
You do not need the coordinates if the neighboring cells are sufficient. But they may help for example when you have 6 neighbors (in 3D) and need to know which is which. Because even if you grid is initially structured, it is internally handled as an unstructured grid.
Best regards,
Yvan