Author |
Message |
Anonymous (anonymous)
New member Username: anonymous
Post Number: 1 Registered: 12-2003
| Posted on Wednesday, December 24, 2003 - 10:52 am: | |
How we can define the following spherical problem in FlexPDE? 1/r^2*dr(r^2*dr(U))-K^m*U^2=0 Thanks |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 81 Registered: 06-2003
| Posted on Wednesday, December 24, 2003 - 03:52 pm: | |
FlexPDE does not have a one-dimensional mode, so you have to do a fake. There are several ways to do it. 1) Define a long, thin strip in (x,y), with x representing your "r" variable. You can rename it "r" if you want to. Then you just type the equation as you have presented it: 1/x^2*dx(x^2*dx(U))-K^m*U^2=0 or if you rename the coordinate, 1/r^2*dr(r^2*dr(U))-K^m*U^2=0 To avoid troubles with the singularity at r=0, you can multiply the r^2 out (remember to multiply natural BC's as well). To avoid instabilities in the fake y-dimension, add a dyy(U) term and a natural(u)=0 top and bottom. 2) Another way is to select YCYLINDER coordinates and define a wedge in RZ. This requires transformation of the equation, because the "r" coordinate is now the cylindrical radius, not the spherical one. But it looks like yours is just a div(grad(u)), so you could use the operators to do the transformation for you. Use a natural(u)=0 boundary condition on the wedge faces.
|
Anonymous (anonymous)
Junior Member Username: anonymous
Post Number: 3 Registered: 12-2003
| Posted on Thursday, December 25, 2003 - 03:11 pm: | |
Hi Robert, Thanks alot, your advices were perfect, both of them took me to exact solution, But I don't realy understand the second alternative. I checked the FLEXPDE refrence manual to see what are the FLEXPDE assumption for curvilinear coordinates. You know laplacian gives us different terms in cylindrical and spherical coordinates. Thanks |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 83 Registered: 06-2003
| Posted on Thursday, December 25, 2003 - 05:09 pm: | |
It's true we don't explicitly state the expansion rules for the differential operators, but we do say in the "Coordinates" section: "The DIV, GRAD, and CURL operators are expanded correctly for the designated geometry. Use of these operators in the EQUATIONS section can considerably simplify problem specification." Since the expansion of these operators in cylindrical geometry is well known, we would be seriously remiss if we got them wrong. The divergence in 2D cylindrical coordinates is (1/r)dr(r*Vr)+dz(Vz), and this is how we expand the div operator. FlexPDE does not explicitly treat spherical coordinates, but this case is easily handled as a cylindrical system (with the caveat that "r" is the cylindrical radius coordinate, not the spherical one). In cylindrical coordinates, FlexPDE assumes that your 2D mesh layout is a cross-section along the axis of a cylinder, and rotates the figure about the axis. Div and Curl are expanded in cylindrical coordinates. If you describe a quarter-circle in this system, the result of the rotation is a half-sphere. It is immaterial what coordinates the system is measured in, because the div and curl are invariants. The divergence is the difference between what goes in and what comes out of an infinitesimal volume (per unit volume). As long as we do the expansion right, you get the right solution.
|
|