Author |
Message |
marlouch (marlouch)
Junior Member Username: marlouch
Post Number: 3 Registered: 07-2006
| Posted on Tuesday, July 11, 2006 - 04:10 am: | |
Hello, I need help about boundary conditions. First, I'm trying to include a circle in a 2D slab, the BC around the circle must verify this conditions D1.grad(phi1)=D2.grad(phi2) phi1 = phi2 D1 is a parameter for background media and D2 is the one for the circle object. May I use "contact" and "jump"? but how ? Then, I'll try to consider the same problem in 3D (a sphere in a box). Will it change the way to write the BC ? Thank you for your help. Marlouch. |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 653 Registered: 06-2003
| Posted on Tuesday, July 11, 2006 - 01:11 pm: | |
The interface condition you want to implement is the default condition for diffusion terms. If phi is your variable and the equation is div(D*grad(phi)) + Source = 0 (or a variation on that theme) Then the default interface condition is 1) Phi is continuous 2) normal(D*grad(phi)) is continuous. See documentation under "Natural Boundary Conditions" in the Help Index. |
marlouch (marlouch)
Member Username: marlouch
Post Number: 4 Registered: 07-2006
| Posted on Thursday, July 13, 2006 - 05:12 am: | |
yes, phi is my variable and the pde is : dt(phi)-vitesse*D*div(grad(phi))+vitesse*mua*phi =S I've seen documentation about "Natural Boundary Conditions" in the Help Index but I've found no help for writting my BC. I've tried to write natural(D2*grad(phi)) = D1*grad(phi) but the syntax is wrong Then, I've tried to create an another variable temp5 : temp5 = grad(phi) and write : natural(temp5) = (D1/D2)*grad(phi) But in this case, I'm getting this error message "operands are not of the same type". Could you please tell me how to solve this problem? Thank you so much. It's urgent. |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 654 Registered: 06-2003
| Posted on Thursday, July 13, 2006 - 01:48 pm: | |
To begin with, you have written your PDE wrong. If you have more than one material, the diffusion term should be written as a divergence of flux. That is, the D should be inside the divergence. (I don't know what the "vitesse" multiplier is. Maybe it goes inside too. Consult a textbook.) Secondly, the "Natural boundary condition" defines the flux at an exterior boundary. "Flux" is defined as the integrand of the surface integral generated by integrating the second-order terms of your equation by parts. If you put the vitesse*D inside the divergence (where it belongs), then the meaning of the Natural BC on an outer boundary in your problem is the normal component of vitesse*D*grad(phi). When applied to an interior boundary, the Natural BC means the DIFFERENCE of the flux values as seen from the two sides of the boundary. In your case the FlexPDE default condition Natural(phi)=0 means that the flux out of material 1 is the same as the flux into material 2. In other words, NO stated internal boundary condition means that flux is conserved across the boundary. This is the condition you are trying so clumsily to construct. IF YOU DO NOTHING, YOU GET THE CONDITION YOU WANT. Notice that in the documentation, we define the syntax of boundary conditions as NATURAL(variable)=expression Read this section again, because you are obviously confused about how to write FlexPDE scripts.
|
Takeyuki Ojima (tac)
Member Username: tac
Post Number: 12 Registered: 07-2005
| Posted on Sunday, July 16, 2006 - 02:46 am: | |
I am not sure that your PDE is wrong. That depends on your physics to be solved, I think. So you must tell not only PDE but your physical problem. |