Author |
Message |
gqzhang (zgqfem)
New member Username: zgqfem
Post Number: 1 Registered: 07-2003
| Posted on Sunday, August 17, 2003 - 08:45 am: | |
I notice that there is initial values option for time depedent problem and static problem, for the purpose of quick convergence,as the manual declared. But to my understanding, for the time dependent problems, inital conditions are requried and must be sepcified definitely for a certain problem, because althrough the equations and boundary conditons are the same, different initial conditions will lead to different solutions. In other words, in time dependent problems, initial conditions are not for speed of convergence,but for complete definition of a solvable problem. so anyone can help me out of confusion or misunderstanding of the manual? thanks
|
Robert G. Nelson (rgnelson)
Member Username: rgnelson
Post Number: 15 Registered: 06-2003
| Posted on Sunday, August 17, 2003 - 08:00 pm: | |
You are exactly right. In steady state problems, the initial values merely serve the purpose of focusing the iterative solution, while in time dependent problems an initial condition is mandatory. However, FlexPDE allows you to omit the INITIAL VALUES specification, in which case all variables are initialized to zero.
|
gqzhang (zgqfem)
New member Username: zgqfem
Post Number: 2 Registered: 07-2003
| Posted on Monday, August 18, 2003 - 08:10 am: | |
So what you mean is that I can omit the initial values specification or just set them to be zero or any value that I think to be suitable in steady state problems; but in transient problem, the initial values specification should be the the initial conditions defining the problems? Is my understanding right?
|
Laurent Simon (lsimon)
Junior Member Username: lsimon
Post Number: 3 Registered: 06-2005
| Posted on Friday, July 01, 2005 - 04:39 pm: | |
Greetings: Is it possible to reset the initial conditions for an ODE problem at some specific times? for instance in the problem below, I would like to set x1 = 1 at time t = 0, x1 = 2 at time t = 80 and x1 = 3 at time t = 100. I thought about using SWAGE. Thank you { kinode1.PDE } title "kinetics" coordinates Cartesian1 variables x1(threshold=1e-7) x2(threshold=1e-7) definitions alpha = 0.4 lam1 =0.00005 lam2 = 1.e-6 k1 = 3600*((1 - alpha)*alpha*(-lam1 + lam2)**2)/((1 - alpha)*lam1 + alpha*lam2) k2 = 3600*((1 - alpha)*lam1 + alpha*lam2) ke = (3600*lam1*lam2)/((1 - alpha)*lam1 + alpha*lam2) initial values x1 = 1.0 x2 = 0.0 equations x1: dt(x1) = -k1* x1 + k2*x2 - ke*x1 x2: dt(x2) = k1* x1 - k2*x2 boundaries region 1 start (0) line to (1) time 0 to 150 monitors for cycle=1 history(x1) history(x2) histories history(x1) history(x2) end
|
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 394 Registered: 06-2003
| Posted on Saturday, July 02, 2005 - 04:33 pm: | |
There is no explicit way to simply reset the solution at a selected time. But you could program source/sink terms localized in time that drive the solution to a selected value. For example, if you add to the right hand side of your X1 equation the term PENALTY*(2-x1)*exp(-((t-80)/twidth)^2 it should drive x1 to the value 2 at t=80, depending on the strength of PENALTY. You should put a plot or monitor at t=80 to be sure the narrow Gaussian is not jumped over by a timestep. |
Laurent Simon (lsimon)
Member Username: lsimon
Post Number: 4 Registered: 06-2005
| Posted on Saturday, July 02, 2005 - 06:34 pm: | |
Thank you very much for your help I will try it |