How to solve reduced FPK equation by ... Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » How to solve reduced FPK equation by FlexPDE? « Previous Next »

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

yongjunwu (yjwu)
New member
Username: yjwu

Post Number: 1
Registered: 11-2004
Posted on Monday, November 08, 2004 - 10:59 pm:   

The pde is attached. How to treat the boundary condition especially the periodic boundary and the normalization condition? Many thanks.
fpk
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 254
Registered: 06-2003
Posted on Tuesday, November 09, 2004 - 03:20 pm:   

If you read the User Guide in the Help package of the evaluation version, or the equivalent Tutorial on the web (www.pdesolutions.com, click Product Info, then Tutorial), you will see that preparing this system for FlexPDE is quite straightforward. The equations will appear very much as you have written them in your posting.

Assuming that gamma1 and delta1 are cartesian coordinates, and using the default X and Y in their place, you will have something like this:

VARIABLES
p
DEFINITIONS
c1 = ...
c2 = ...
b11 = ...
b22 = ...
EQUATIONS
0.5*dxx(b11*p) + 0.5*dyy(b22*p) - dx(c1*p) -dy(c2*p) = 0

BOUNDARIES
REGION 1
START(0,0) LINE TO (2*PI,0)
PERIODIC(x-2*PI,y) TO (2*PI,1)
LINE TO (0,1) TO FINISH

CONSTRAINTS
INTEGRAL(p)=1

This layout will impose boundary conditions
0.5*dy(b22*p)=0 on y=0 and y=1 boundaries, because of the default NATURAL(p)=0 condition.

Periodic boundary conditions are discussed in the Help system index under "Periodic". Examples of Periodic boundary conditions are in the "Samples|Misc|Periodicity" folder of the evaluation installation.

Boundary conditions are discussed in the User Guide and in the Help Index under "Boundary Conditions".

Constraints are discussed in the Help Index under "Constraints". Examples of constraints are in the "Samples | Misc | Constraints" folder.


Top of pagePrevious messageNext messageBottom of page Link to this message

yongjunwu (yjwu)
New member
Username: yjwu

Post Number: 2
Registered: 11-2004
Posted on Wednesday, November 10, 2004 - 01:50 am:   

Thank Nelson for kind help. I followed your instructions but unfortunately, FlexPDE gave me result p=0! It seemed that the constraint INTEGRAL(p)=1 didn't work. I tried to solve the un-reduced FPK equation:
0.5*dxx(b11*p) + 0.5*dyy(b22*p) - dx(c1*p) -dy(c2*p) = dt(p)
and I failed too. FlexPDE generated following error:


My program is below:
**********************************************
VARIABLES
p
DEFINITIONS
P11=0.1
P12=0.02
P13=0.5
P14=0.5
P21=0.02
P22=0.02
P23=0.5
P24=0.5
Beta11=0.03
Beta21=0.02
Omega01=1.0
Omega02=2.7
Bigomega=1.9
D1=0.004
D2=0.004
c1= Bigomega-2*Omega01+0.5*P11*cos(x)/Omega01
c2=(1-y)*y**2*(2*D2*P23**2-D1*P13**2)/Omega01/Omega01-D2*P23**2*y**2/Omega01/Omega01
+(1-y)**2*y*(D2*P24**2-2*D1*P14**2)/Omega02/Omega02 +D1*P14**2*(1-y)**2/Omega02/Omega02
+(1-y)**2*y*(-Beta11+Beta21+D1*P13**2/Omega01/Omega01
-D2*P24**2/Omega02/Omega02+0.5*P11*sin(x)/Omega01)
b11=3*D1*P13**2/Omega01/Omega01+2*D1*P14**2*(1-y)/y/Omega02/Omega02
b22=D1*P13**2*(1-y)**2*y**2/Omega01/Omega01+2*D2*P23**2*(1-y)*y**3/Omega01/Omega01
+2*D1*P14**2*(1-y)**3*y/Omega02/Omega02+D2*P24**2*(1-y)**2*y**2/Omega02/Omega02

INITIAL VALUES
p =0.5/pi

EQUATIONS

0.5*dxx(b11*p)+0.5*dyy(b22*p)-dx(c1*p)-dy(c2*p)=dt(p)

BOUNDARIES

REGION 1
start(0,0) line to (2*PI,0)
periodic(x-2*PI,y) line to (2*PI,1)
line to (0,1) to finish

CONSTRAINTS
integral(p)=1

TIME 0 to 5 by 0.01


PLOTS
for t=0.05 by 0.05 to 0.2 by 0.1 to endtime
surface(p)
monitors
contour(p)
end
*************************************************
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 256
Registered: 06-2003
Posted on Wednesday, November 10, 2004 - 02:18 pm:   

If you modify your plot commands to those shown below, you will see that your coefficient B11 is pathological at y=0.

The computer hardware performs arithmetic with approximately 16 decimal digits of accuracy. Your B11 along y=0 is 40 orders of magnitude greater than the rest of the coefficients in the equation, so everything is lost in roundoff.

You should re-examine what this B11 coefficient means.

Whenever you construct a new problem, you should include frequent monitors, so you can watch what is happening early in the run, rather than waiting blindly for hours to discover an inexplicible final result. In the following, I have monitored everything meaningful on every timestep. You can see right away what the problem is.


MONITORS
for cycle=1
contour(p)
contour(b11) contour(b22)
contour(c1) contour(c2)

PLOTS
for t=0.05 by 0.05 to 0.2 by 0.1 to endtime
contour(p)
surface(p)
Top of pagePrevious messageNext messageBottom of page Link to this message

yongjunwu (yjwu)
Junior Member
Username: yjwu

Post Number: 3
Registered: 11-2004
Posted on Wednesday, November 10, 2004 - 09:07 pm:   

I see. But why the CONSTRAINTS INTEGRAL(p)=1 didn't work in the case dt(p)=0? If the constraint isn't added, apparently,p=0 is the solution of the reduced FPK equation. However, this result is meaningless. It's too confused a problem. Thank you very much, Mr Nelson.

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