CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Main CFD Forum (http://www.cfd-online.com/Forums/main/)
-   -   Numerical Scheme for a CFD problem (http://www.cfd-online.com/Forums/main/123846-numerical-scheme-cfd-problem.html)

 Saturn_V September 22, 2013 17:34

Numerical Scheme for a CFD problem

Hi, I am quite new to the CFD field and I am eager to learn.
In particular, I am trying to write down a code from scratch in order to solve a CFD problem, but I am not sure which numerical scheme is better for my purposes (I don't want to use a ready-to-use CFD package).
In particular, my problem has the following features:
1) Spherical symmetry
2) Time dependent
3) Supersonic regime
4) No viscosity
5) Optically thick medium
6) No chemical reactions and no magnetic fields

At the moment I don't need a super-accurate numerical scheme, just something to start with which is sufficiently precise.

Thank you very much for any help.

Marco

 FMDenaro September 23, 2013 04:02

Quote:
 Originally Posted by Saturn_V (Post 453014) Hi, I am quite new to the CFD field and I am eager to learn. In particular, I am trying to write down a code from scratch in order to solve a CFD problem, but I am not sure which numerical scheme is better for my purposes (I don't want to use a ready-to-use CFD package). In particular, my problem has the following features: 1) Spherical symmetry 2) Time dependent 3) Supersonic regime 4) No viscosity 5) Optically thick medium 6) No chemical reactions and no magnetic fields At the moment I don't need a super-accurate numerical scheme, just something to start with which is sufficiently precise. Thank you very much for any help. Marco

Hello, if I am write, you need to solve a 1D problem (t,r)?
Therefore, standar solvers for Euler equations are suitable for you (see the book of LeVeque or the older book of Hirsch). You can start by developing a simple first-order scheme, that is forward time integration plus first-order upwinded flux reconstruction.
That is simple to code but is quite diffusive therefore I suggest to use a very refined grid.
What do you mean for "Optically thick medium"?

 Saturn_V September 23, 2013 11:16

Yes, I need to solve a 1-D problem (r,t).
By optically thick I mean that the medium (gas) absorbs and re-emits radiation in an extensive manner.
So maybe I could use a simple Godunov's solver ?

Thank you

Marco

 FMDenaro September 23, 2013 12:12

Quote:
 Originally Posted by Saturn_V (Post 453153) Yes, I need to solve a 1-D problem (r,t). By optically thick I mean that the medium (gas) absorbs and re-emits radiation in an extensive manner. So maybe I could use a simple Godunov's solver ? Thank you Marco

yes, with a very fine grid ;)

 Saturn_V September 24, 2013 12:35

1 Attachment(s)
I have implemented a basic Godunov solver and I am testing it with the Sod shock tube test.
I am attaching the plot of the velocity as a function of the position (the initial discontinuity is a x=0.3). As you see, the graph is quite good, but there is a strange increase in velocity around the shock front position.
I do suppose that this is a numerical issue due to the elementary method I used. Maybe more advanced methods could represent the shock front in a much better way. Do you think that this is the case?
If so, this method is good for me because for my application i do not expect to encounter strong discontinuities.

Thank you very much for all the cooperation!

Marco

 FMDenaro September 24, 2013 13:07

you should have an expansion wave region... what about density and pressure?

Check this report http://oai.cwi.nl/oai/asset/10964/10964D.pdf

 Saturn_V September 24, 2013 13:15

2 Attachment(s)
Attached you can find density and pressure.
:)

Marco

 FMDenaro September 24, 2013 13:45

Quote:
 Originally Posted by Saturn_V (Post 453352) Attached you can find density and pressure. :) Marco

Your results have some strange behavior ... better you check for the shock tube test in the report, you should have expansion waves, shock and a contact discontinuity ...

 Saturn_V September 25, 2013 02:54

Ok thank you very much for your help.
I solved the problem with the Godunov upwind scheme and also coded successfully a HLLC version of the HD integrator, it is fantastic!!
:)

Grazie!

Marco

 All times are GMT -4. The time now is 12:03.