Problems with equations discretization?
I have problem with discretizing the following equation.
u_t+(x**(1/3))u_x=c(t) where u_t and u_x is the partial differentials of u w.r.t t and x respectively. and c is the time varycoeffcints let us say it is equal to sin(wt). I am using finite difference CN my solution blows up. So Is there anybody who had already encountered such a problem. Please advice me. 
Re: Problems with equations discretization?

Re: Problems with equations discretization?
Yes thanks Praveen. 1)What is your domain ? It is simple one dimensional rectangular tube. # What are the boundary conditions ? when c(t)>=0 and u(a,t)=0,u_t=0 when c(t)<0 or u(a,t)<0 u_x=0 where x=a is at the wall. # What is the finite difference formula used ? I am uisng forward difference in time and backward difference in space(1dimenisonal). # Does CN = Crank Nicholson ? yes it is I also checked with fully implict scheme.
IF it is enough if you need some more information . I can provide you. Pr 
Re: Problems with equations discretization?
CN is not (always) a good method for hyperbolic problems and this may be part of your problem. Have you tried using LaxWendroff?
Also have you compared your results with the exact solution which is u = f(X) + C(t) where C(t) = int_0^t c(s).ds, X=( t +x^2/3 )^3/2 and u(x) = f(x) at t=0. You should also check whether your "boundary conditions" are consistent with the equation! hope this helps, Tom. 
Re: Problems with equations discretization?
Thanks tom,
Thanks for the sloution now I did not tried Lax wendroff method. But I want to know how did you obtain the exact solution for this problem. Pr 
Re: Problems with equations discretization?
Please see here for the derivation of exact solution. I think you are not applying correct initial and boundary conditions. Please let me know if this helps. Also I feel that a finite volume method would be more appropriate.

Re: Problems with equations discretization?
It's called the method of characteristics. Basically along a characteristic curve a pde degenerates to system of odes which in your particular problem is
dx/dt = x^1/3, du/dt = c(t) You can solve any first order pde (even nonlinear) using this method. In the above you have that du/dt = c along the curve (3/2)x^(2/3) = t + (3/2)X^(2/3) where X is a 'constant' of integration ( chosen sho that x=X at t=0) and so u = f(X) + C(t) with X = ( x^2/3  2t/3 )^3/2 (I miss typed this last equation in the original post). Any elementary book on pdes will cover this. The characteristics are very important in determining the types of boundary conitions (and numerical method used) to properly define a problem; e.g. if initial data is prescribed on a characteristic curve then it will be impossible to solve the pde. Tom. P.S. the corrected equation above indicates why the solution may be blowing up! 
Re: Problems with equations discretization?
Hi Thanks pravin and tom this was helpful I am just going thru it.
But I have certain msitakes in the equation let me specify it correctly. I have problem with discretizing the following equation. u_t+(x**(1/3))[1+(u_x)^2]^{1/2}=c(t) yes for larger value of u_x the equation will reduce to u_t+(x**(1/3))u_x=c(t) where u_t and u_y is the partial differentials of u w.r.t t and y respectively. and c is the time varycoeffcints let us say it is equal to sin(wt). I am using finite difference CN my solution blows up. So Is there anybody who had already encountered such a problem. Please advice me. 
Re: Problems with equations discretization?
Hi Tom and Pravin. Please help me will there be any change with new equations then probabaly I will use the exact sloution and confirm the boundary conditions. Alo any suggestion with numerical schemes. I tried lax wendroff id does not work out for me. Thanks in advance Pr

Re: Problems with equations discretization?
Your changed equation changes the form of the exact solution some what. If you define
p=u_t and q=u_x then your equation becomes F = p + x^(1/3).[ 1 + q^2 ]^(1/2) c(t) = 0 you can then write down odes for x,p,q,u; e.g. dp/dt = dc/dt, dx/dt = x^(1/3)q.( 1 + q^2 )^(1/2), dq/dt = (1/3)x^(2/3).( 1 + q^2 )^(1/2) du/dt = p + x^(1/3).q.( 1 + q^2 )^(1/2) at t=0 you will have x=s, u=f(s) => q = f'(s) => p from the governing equation. (Note that the p equation can be integrated exactly). You can solve the above system using a standard time integration scheme (you can also reduce the number of equations by doing some/all of the integrations by hand) such as a 4th order RungeKutta for each initial point x=s. Tom. 
Re: Problems with equations discretization?
If your spatial domain includes any piece of the negative xaxis then your backward differencing is incorrect.

Re: Problems with equations discretization?
I want to decise here clearly
The equation I have given is u_t+(x**(1/3))[1+(u_x)^2]^{1/2}=c(t) so basic it is like convection equation where convection of the wave is determined by (x**(1/3))[1+(u_x)^2]^{1/2},c(t) they are competing with each other c(t) is trying to move it from left to right and other term is trying to move it to right to left. As long as c(t) is greater than the other term the solution will be be positve and moving forwards. But as i said c(t) is a sin function so when it less than the other term the solution move back. This where I get some problem I do not understand peter what you meant by piece of negative xaxis.Can you elaborate. Thanks anyways. Pr 
Re: Problems with equations discretization?
Your interpretation of the behaviour of the pde is incorrect read my earlier post which explains how to solve the full nonlinear problem!

Re: Problems with equations discretization?
Actually I will clarify with that I have already discretized the following equations with boundary conditions already specified u_t+A[1+(u_x)^2]^{1/2}=c(t) Where A is constant where the I used Backward difference and CN scheme which works perfectly well. When I took this problem u_t+(x**(1/3)[1+(u_x)^2]^{1/2}=c(t) where A is =x**(1/3) Uisng the same scheme sa above the solution blows up.And hence the problem.
Tom thanks for the help but I want to clearly write the full equation beacsuse the method of characteristics is somehwat new for me. Thnaks again 
Re: Problems with equations discretization?
if A is ever negative then your discretization violates the flow of information along characteristics. That would be a reason for the blowup.

Re: Problems with equations discretization?
Thanks peter, But A is never negative for my case. One more suggestion. If you suggesting something please try to be up to the point be more clear. Please do not take it otherwise. Pr

Re: Problems with equations discretization?
>with boundary conditions already specified
:u_t+A[1+(u_x)^2]^{1/2}=c(t) Where A is constant :I used Backward difference and CN scheme which works :perfectly well. When I took this problem :u_t+(x**(1/3)[1+(u_x)^2]^{1/2}=c(t) where A is :=x**(1/3) Uisng the same scheme sa above the solution :blows up. Is your computational domain the interval x\in [0,a] ? If it is then the curve x=0, t\geq 0 (i.e., the time axis) is a characteristic boundary (since there x^{1/3} vanishes). You should state your problem clearly if you expect anyone to help you. 
All times are GMT 4. The time now is 11:20. 