reaction-transport Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » reaction-transport « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Amlan Banerjee (amlan)
Member
Username: amlan

Post Number: 5
Registered: 07-2005
Posted on Friday, July 29, 2005 - 02:46 am:   

hi all:

i am attaching my code.it is behaving strangely. it is a system of reaction-transport-diffusion equations where time is supposed to increase incermentaly. but the opposite is happening. time step (Dt) keeps on decreasing along with time (Time) and after several cycles it is giving me errors. i am trying to figure out what the problem is but without any luck.
I did it run in v4 as well as in v5 but nothing is getting out of it.

can anyone help me out or give me some clue.

thanking you

Amlan
application/octet-streamRXN1
RXN1modified.pde (2.8 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Amlan Banerjee (amlan)
Member
Username: amlan

Post Number: 6
Registered: 07-2005
Posted on Friday, July 29, 2005 - 04:43 pm:   

hi all:

i am attaching my code.it is behaving strangely. it is a system of reaction-transport-diffusion equations where time is supposed to increase incermentaly. but the opposite is happening. time step (Dt) keeps on decreasing along with time (Time) and after several cycles it is giving me errors. i am trying to figure out what the problem is but without any luck.
I did it run in v4 as well as in v5 but nothing is getting out of it.

can anyone help me out or give me some clue.

thanking you

Amlan
application/octet-stream
RXN1modified.pde (2.8 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 418
Registered: 06-2003
Posted on Friday, July 29, 2005 - 05:05 pm:   

1.
I will deliver again my oft-repeated lecture:

You MUST MUST MUST use MONITORS to observe the behavior of your solution.

If things are acting strangely, all you have to do is open your eyes (Monitors) and LOOK.

That is what the MONITORS section is there for. FlexPDE does not force you to wait blindly until the answer comes out.

Add the following to your script:
MONITORS
for cycle=1
contour(c_Al ) zoom(0,0, 5,0.1)
contour(c_H) zoom(0,0, 5,0.1)
contour(c_SiO2) zoom(0,0, 5,0.1)
contour(Vol) zoom(0,0, 5,0.1)

If this doesn't give you a clue as to what is going wrong, then add plots of all the coefficients of the dt() dx() and dxx() terms.

2.
I see that you have a 1D equation in a 2D domain without a stabilizing diffusion in the fake dimension. See the notes to "Samples | Misc | one_dim.pde".

3.
I see that the VOL equation is a point equation with no stabilizing diffusion terms. If the Monitors show y-dimension oscillation, add a small div(grad(vol)) term to the equation.

Top of pagePrevious messageNext messageBottom of page Link to this message

Amlan Banerjee (amlan)
Member
Username: amlan

Post Number: 7
Registered: 07-2005
Posted on Sunday, July 31, 2005 - 11:30 pm:   

Hi all:

i am getting an error message as below

SINGULAR DIAGONAL AT BLOCK ROW 5 (17-20)!
Fatal_Err The Linear System Solver has encountered
a Singular Diagonal Block at Node Row 5.
An equation has collapsed to 0=0

can any one let me know what it mean and how to resolve this error.

Sincerely

Amlan

N:B. Thanks RGN for your valuable suggestions.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 419
Registered: 06-2003
Posted on Monday, August 01, 2005 - 04:19 pm:   

The diagnostic says exactly what it means:
"An Equation has collapsed to 0=0".

The way to resolve it is to be sure that your equations always contain some nonzero terms.
Top of pagePrevious messageNext messageBottom of page Link to this message

Amlan Banerjee (amlan)
Member
Username: amlan

Post Number: 8
Registered: 07-2005
Posted on Friday, August 26, 2005 - 12:58 pm:   

Hi all:

I have an equation of the form:

dx(phi*D*dx(ci))-theta*dx(ci)+reaction terms=0

breaking it down in the form,

D*dx(ci)*dx(phi)+phi*dx(ci)*dx(D)+phi*D*dxx(ci)-theta*dx(ci)+reaction terms=0

Can anyone tell me how to write it using FlexPDE? I tried but get no clue.

Any suggestions and help is most welcome.

Thanks

Amlan
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 434
Registered: 06-2003
Posted on Friday, August 26, 2005 - 02:14 pm:   

The best way to write this for FLexPDE is

dx(phi*D*dx(ci))-theta*dx(ci)+reaction terms=0

the second order term will be integrated by parts, making phi*D*dx(ci) the natural boundary condition and conserving flux of ci internally.
Top of pagePrevious messageNext messageBottom of page Link to this message

Amlan Banerjee (amlan)
Member
Username: amlan

Post Number: 9
Registered: 07-2005
Posted on Tuesday, August 30, 2005 - 05:51 pm:   

Hi All:

I am getting "matrix dimension mismatch" error. Can any one tell me how to solve it? Is it possible to check for the array/dimensions of the veriables in FlexPDE. I am attaching my codes (1D and 2D).

help plzzzzzz.

Thanking you

Amlan
application/octet-stream
dynamic modeling 1D.pde (3.6 k)
application/octet-stream
dynamic modeling 2D.pde (3.9 k)
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 440
Registered: 06-2003
Posted on Tuesday, August 30, 2005 - 06:27 pm:   

There were some errors of this kind that were fixed in version 5.0.6, so you should download the latest version. These errors appear when apparent dependencies disappear due to IF statements.

Your problems still do not run on 5.0.6, because it appears you have inconsistencies between your initial conditions, boundary conditions and PDE that drive the timestep to zero. You should be sure that the initial conditions and BCs are consistent and are solutions to the PDE. Turn boundary values on with a RAMP.

You should also examine all those IF statements. If parameters of boundary conditions are discontinuous in time or in variable dependence, you can create an instability that is slow or impossible to solve.

Also, "Vgi" should not be a variable. It is not defined by a PDE. It is merely an algebraic relationship.

You might want to put in a small damping diffusion in the "van" equation, since it has no spatial derivatives.

In the 2D version, you should put in stabilizing diffusion terms in Y, since the equations contain no coupling in this direction.
Top of pagePrevious messageNext messageBottom of page Link to this message

Amlan Banerjee (amlan)
Member
Username: amlan

Post Number: 10
Registered: 07-2005
Posted on Thursday, September 01, 2005 - 06:10 pm:   

Hi All:

FlexPDE uses RAMP in the form

"value = RAMP(expression, left_value, right_value, width)

This expression is logically equivalent to

value = IF expression < 0 THEN left_value ELSE right_value"

I have logical statement in the form

if (expression>1) then 1
else if (expression <0) then 0
else(expression)

How do I use RAMP in this case.

Thanking you

Amlan
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 443
Registered: 06-2003
Posted on Thursday, September 01, 2005 - 07:31 pm:   

What you have shown is merely a min and max clamp on a value. This is unrelated to the issue I was addressing with my statement about RAMP.

The problem arises when you specify an instantaneous turn-on of a boundary value or a discontinuous initial condition or boundary value.

If you examine the Fourier expansion of a step function, you will find it has terms at all frequencies out to infinity. Any numerical approximation must necessarily truncate this expansion in some way, leading to Gibbs phenomena and ringing.

FlexPDE is an adaptive system, and tries to model the system you describe. A step function requires an infinite number of nodes and a timestep of zero.

I therefore suggest that you soften the instantaneous turn-on or discontinuous boundary condition by using a ramp to make the switch more gradual and make it representable by a finite number of Fourier components.

One way to do this is to change a statement such as
Value(v)=number
where number is different than the initial values you assigned to v near the boundary,
to say
value(v) = URAMP(0,turnontime)*number

In this way there is some hope of the solution being polynomial at some scale similar to turnontime.
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 444
Registered: 06-2003
Posted on Thursday, September 01, 2005 - 07:37 pm:   

Sorry. The form for a URAMP from t=0 to t=turnontime is
URAMP(t, t-turnontime)

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration