Constraints on dependent variables in PDE Toolbox
5 次查看(过去 30 天)
显示 更早的评论
Can one impose constrains on a dependent variable in using the PDE Toolbox? That's the general question. My specific problem is as follows. Originally the problem is the 3D Laplace equation in variable T(x,y,z). Because the geometry is a plate-like object, I finite difference in the z direction and get a system of elliptic equation in dependent variables T1(x,y), T2(x,y),... Tn(x,y). Because of additional physics going on at the top and bottom z's, T1 and Tn are described by differential equations, BUT only on part of the uppper and lower z surfaces. On the other parts, the original boundary condition (Robin) turns into contraints for T1 and Tn. Bottom line: I have n elliptic equations in T1,...,Tn. BC's on each don't matter (say zero flux). T1 and Tn have contraints in some subdomain of (x,y) of the form (T2-T1)/dz = a*T1 and similar for Tn, where dz is the distance between z levels. I tried to handle this by simply making the c coefficients for the T1 and Tn equations very small in the subset of triangles corresponding to where the contraints are. This seemingly works well, and is independent of my choice of small value for c, as long as it's small enough,, however the result is dependent on my choice of dz (i.e., number of discrete z levels I choose). Perhaps I've done the math wrong, but this in any case seems related to the more general question of imposing constraints. It would be better if there were simply a way of doing this.
2 个评论
Bill Greene
2013-9-11
Before trying to answer this I want to make sure I understand the question. Do I understand right that you are trying to apply either a Dirichlet or Neumann constraint at points that are not on the boundary edges of the 2D model-- i.e. are at some points in the interior?
回答(1 个)
Bill Greene
2013-9-11
Hi Richard,
I'm still not sure I'm understanding you so am not sure my "solution" will help but I'll explain it anyway.
It is possible include some additional constraints in your model using the following approach. (This assumes your equations are linear and requires a bit of programming.)
You can use the matrix form of assempde:
[K,M,F,Q,G,H,R]=assempde(b,p,e,t,c,a,f)
to return the global finite element matrices for the model. The H and R matrices define a constraint equation for every boundary point where you have specifed a Dirichlet constraint. If you want to constrain a dependent degree-of-freedom at some node not on the boundary, you can simply append an equation to the H and R matrices defining this constraint. Then you pass your modified H and R matrices along with the original K, M, F, Q, and G matrices back to assempde for the solution:
u=assempde(K,M,F,Q,G,H,R)
If you decide to give this a try, I suggest trying it on a very simple model first so you can print the original and new H and R matrices to verify their correctness.
Regards,
Bill
2 个评论
xl z
2024-6-12
Here, What is the composition of the elements in the R and H matrices ? In other words, how should I modify the R and H matrices? Thank
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!