CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   CFD code layout (https://www.cfd-online.com/Forums/main/164075-cfd-code-layout.html)

plasmaCode December 11, 2015 22:26

CFD code layout
 
Hello everyone,


I am a master student in aerospace engineering. I need to develop a plasma code within about one semester (4 months) in order to graduate on time. The plasma code must couple the Poisson and drift-diffusion equations with the laminar compressible Navier-Stokes equation.

I took some course on numerical aerodynamics and I am familiar with notions like explicit scheme, implicit scheme, semi-implicit scheme, CFL, stability, consistency, etc. I am familiar with finite difference method and I am implementing this method in my code. Of course, I have already coded the heat equation, the 1D Euler equation, and the 2D Poisson equation but only for extremely simple case.

While I have some limited experience in coding, I have some difficulty to design the general layout of my code (meshing, boundary conditions, etc.). My geometry is relatively simple but my code need to be flexible enough in order to eventually implement some modifications. Do someone have some recommendations for the layout of my code?

Thanks very much.

FMDenaro December 12, 2015 04:50

Quote:

Originally Posted by plasmaCode (Post 577314)
Hello everyone,


I am a master student in aerospace engineering. I need to develop a plasma code within about one semester (4 months) in order to graduate on time. The plasma code must couple the Poisson and drift-diffusion equations with the laminar compressible Navier-Stokes equation.

I took some course on numerical aerodynamics and I am familiar with notions like explicit scheme, implicit scheme, semi-implicit scheme, CFL, stability, consistency, etc. I am familiar with finite difference method and I am implementing this method in my code. Of course, I have already coded the heat equation, the 1D Euler equation, and the 2D Poisson equation but only for extremely simple case.

While I have some limited experience in coding, I have some difficulty to design the general layout of my code (meshing, boundary conditions, etc.). My geometry is relatively simple but my code need to be flexible enough in order to eventually implement some modifications. Do someone have some recommendations for the layout of my code?

Thanks very much.


Generally, the grid generation is a specific and different code that provides only the grid topology to be read by the CFD code...The CFD code defines the BC.s and initial condition and contains the general solver. I strongly suggest to use a Finite Volume discretization for mass, momentum and total energy equations so that you have a fully conservative formulation.

The CFD code provides only the data-set for the solution and a post-processing code for visualization, as well as statistical purposes is the third element you need.

mprinkey December 12, 2015 20:29

Quote:

Originally Posted by plasmaCode (Post 577314)
Hello everyone,


I am a master student in aerospace engineering. I need to develop a plasma code within about one semester (4 months) in order to graduate on time. The plasma code must couple the Poisson and drift-diffusion equations with the laminar compressible Navier-Stokes equation.

I took some course on numerical aerodynamics and I am familiar with notions like explicit scheme, implicit scheme, semi-implicit scheme, CFL, stability, consistency, etc. I am familiar with finite difference method and I am implementing this method in my code. Of course, I have already coded the heat equation, the 1D Euler equation, and the 2D Poisson equation but only for extremely simple case.

While I have some limited experience in coding, I have some difficulty to design the general layout of my code (meshing, boundary conditions, etc.). My geometry is relatively simple but my code need to be flexible enough in order to eventually implement some modifications. Do someone have some recommendations for the layout of my code?

Thanks very much.

What you are trying to do is going to be difficult in the time frame that you have, especially considering your lack of CFD coding experience. If you are able to start with an existing compressible NS solver, or even better, start with OpenFOAM and code your solver in that framework, you have a chance of completing in 4 months. This is doubly true if your target geometry is more complicated than a simple duct. There is a lot of code complexity associated with even solving a simple Poisson equation on an unstructured or coordinate transformed structured mesh.

OpenFOAM gives you access to all of the base CFD features, including FV formulations on unstructured meshes for very general transport equations, lots of interpolation schemes, various linear equation solvers, parallel functionality, etc. And there are lots and lots of example solvers to help you learn. If you are permitted to use OpenFOAM, I recommend that you do.

On the other hand, if you can start from scratch and get all of that physics coded and working in a coupled way within four months, then send me your resume when you are done. 8)

karmehak December 12, 2015 22:10

I think you have to go with finite element method for solving that problem effectively


All times are GMT -4. The time now is 02:06.