code in f90
Dear All
I need to code the following equation U_{t} + F(U)_{x} = S(U) i've read lots of books and ref. etc. but I couldn't code the methods in f90. i was able only to code the case when S(U) = 0 using upwind methods etc. so can somebody help me by giveing me a 90 code to solve any linear or nonlinear case. many thanks 
Re: code in f90
Use Strang Splitting when S(U) really is a physcial source term. In each time step you first solve
U_t + F_x=0(PDE), then solve U_t=S (ODE). Check some text books on CFD. 
Re: code in f90
I'm not sure whether I have understood your question. But I have an idea... Maybe u can try it.
since F=F(U)_{x}, you can also regard S(U) as S(U,x) i.e. S(U)_{x} then you can get: U_{t} + F(U)_{x}  S(U)_{x} = 0 => U_{t} + G(U)_{x} = 0 where G = F  S 
Re: code in f90
S(U) is physical sourc term. so say we solve
U_t + F_x=0(PDE) using upwind methods, what shall i use to solve U_t=S (ODE)!!! 
Re: code in f90
If you are using an upwind scheme for the flux the it is necessary to incoporate source terms in the upwind formulation otherwise the results could be inaccurate depending upon the strength of the source terms. You may want to consult the following paper for the upwind procedure to incorporate source terms:
Construction of SecondOrder TVD Schemes for Non homogeneous Hyperbolic Conservation Laws, L. Gascon and J.M. Corberan, J. of Computational Physics, Vol. 172, pp. 261297(2001). 
Re: code in f90
Generally, U_t=S(U) is very stiff, so you must use a stiff ODE solver.

Re: code in f90
what do you mean by:
U_t=S(U) is very stiff thanks 
All times are GMT 4. The time now is 20:31. 