CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Problems with equations discretization?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 14, 2003, 08:24
Default Problems with equations discretization?
  #1
Pr
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   October 14, 2003, 12:25
Default Re: Problems with equations discretization?
  #2
Praveen
Guest
 
Posts: n/a
  1. What is your domain ?
  2. What are the boundary conditions ?
  3. What is the finite difference formula used ?
  4. Does CN = Crank Nicholson ?
  Reply With Quote

Old   October 15, 2003, 03:51
Default Re: Problems with equations discretization?
  #3
Pr
Guest
 
Posts: n/a
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(1-dimenisonal). # 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

  Reply With Quote

Old   October 15, 2003, 06:06
Default Re: Problems with equations discretization?
  #4
Tom
Guest
 
Posts: n/a
CN is not (always) a good method for hyperbolic problems and this may be part of your problem. Have you tried using Lax-Wendroff?

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.
  Reply With Quote

Old   October 15, 2003, 06:15
Default Re: Problems with equations discretization?
  #5
Pr
Guest
 
Posts: n/a
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
  Reply With Quote

Old   October 15, 2003, 06:37
Default Re: Problems with equations discretization?
  #6
Praveen
Guest
 
Posts: n/a
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.
  Reply With Quote

Old   October 15, 2003, 06:51
Default Re: Problems with equations discretization?
  #7
Tom
Guest
 
Posts: n/a
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!
  Reply With Quote

Old   October 15, 2003, 07:03
Default Re: Problems with equations discretization?
  #8
Pr
Guest
 
Posts: n/a
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.

  Reply With Quote

Old   October 16, 2003, 05:16
Default Re: Problems with equations discretization?
  #9
Pr
Guest
 
Posts: n/a
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
  Reply With Quote

Old   October 16, 2003, 07:23
Default Re: Problems with equations discretization?
  #10
Tom
Guest
 
Posts: n/a
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 Runge-Kutta for each initial point x=s.

Tom.
  Reply With Quote

Old   October 17, 2003, 00:49
Default Re: Problems with equations discretization?
  #11
peter
Guest
 
Posts: n/a
If your spatial domain includes any piece of the negative x-axis then your backward differencing is incorrect.
  Reply With Quote

Old   October 17, 2003, 04:11
Default Re: Problems with equations discretization?
  #12
Pr
Guest
 
Posts: n/a
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 x-axis.Can you elaborate. Thanks anyways. Pr
  Reply With Quote

Old   October 17, 2003, 05:33
Default Re: Problems with equations discretization?
  #13
Tom
Guest
 
Posts: n/a
Your interpretation of the behaviour of the pde is incorrect read my earlier post which explains how to solve the full nonlinear problem!
  Reply With Quote

Old   October 17, 2003, 06:07
Default Re: Problems with equations discretization?
  #14
Pr
Guest
 
Posts: n/a
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

  Reply With Quote

Old   October 19, 2003, 15:17
Default Re: Problems with equations discretization?
  #15
Peter
Guest
 
Posts: n/a
if A is ever negative then your discretization violates the flow of information along characteristics. That would be a reason for the blow-up.
  Reply With Quote

Old   October 20, 2003, 05:31
Default Re: Problems with equations discretization?
  #16
Pr
Guest
 
Posts: n/a
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
  Reply With Quote

Old   October 20, 2003, 21:38
Default Re: Problems with equations discretization?
  #17
Peter
Guest
 
Posts: n/a
>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
erfectly 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.
  Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide: Writing Equations in LaTeX on the CFD Online Forums pete Site Help, Feedback & Discussions 27 May 19, 2022 04:19
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 07:27
CFD governing equations m.gos Main CFD Forum 0 April 30, 2011 15:21
Space and time discretization of Euler equation Hooman Main CFD Forum 2 June 6, 2010 09:30
Equations Andres Bernal Ortiz CFX 1 January 6, 2007 12:56


All times are GMT -4. The time now is 17:41.