COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Programmatic solving of nonlinear elliptic PDE?

• Follow

```I'm trying to solve a cubic elliptic PDE programmatically. I've already had to compromise by using the pdetool toolbox (GUI) to generate a boundary condition file, which I hope is correctly showing me how to construct   b,  the boundary condition matrix. I'm having difficulty understanding the documentation (i.e. the code comments) for   assempde   -  for the PDE coefficients   c, a, and f   and also cannot see how to correctly package, as a VECTOR for U0, my tentative solution (which is a space 2D array). I'm wondering just what, ijn language I understand, the N, N are supposed to represent in the tensor for coefficient   c  ('System case' - maybe I should be thinking 'Scalar case'?). I'm just hoping my boundary condition matrix,  b  , taken from a GUI session, is correct. It may well not be. To start with I'll settle for Dirichlet boundary conditions  u = 0,  all round (just one
rectangle involved). I have more confidence that my geometry matrix is as it should be. I'd very much like to establish contact with anyone who has tried to solve any 2 space dimensions PDE programmatically using MATLAB, especially anyone who has succeeded!  nrc   is 48 (alerted by error message from  sub-call  assema) whereas it should be >= 1 and <=4 from inspecting the code for assema. (A row of 48s does (coincidentally?) appear in  b,  toward the bottom.) . This error in   nrc   value is the current found bug. I'm wondering as a result of the error message and some comments if   nrc   should be  2 (for 'dimensionality' = 2?).

Confidentiality assured if required. Do please contact me if you can either help or would like to pool experience in this area. with a view to achieving programmatic solutions of 2D (space) PDEs using MATLAB's PDE routines.
```
 0

```Assuming that pdetool can handle the equation that you are dealing with.
You can generate the geometry and boundary conditions in pdetool and compare against your own and check if they are correct. (using generic scalar or system depending on your problem)
The solution is a vector! Even if you are working with the system case. In this way your solution will be U=[ux1 ux2 ux3.... uy1 uy2 uy3...].
N is the number of degrees of freedom. Scalar case N=1, System case N=2.
C represents the material properties. In heat conduction for example is the conductivity tensor, in elasticity is the constitutive tensor. It is explained how to write it in assempde function help.
The 48s in b matrix represents the ascii notation for 0.
The number of rows in c (nrc) depends on the problem... You should say how many rows are necessary.
For example: In the heat problem if you use c=1; you are assuming that your material is isotropic and the conductivity tensor is k=[1 0; 0 1];
In order to solve programmatically, keep in mind that:
assema builds the stiffiness matrix, mass matrix and force vector
assemb builds the boundary conditions
assempde uses this two above functions to solve the problem.
So, basically you need only assempde to solve a problem.
Hope it helps!
```
 0

```"Diego " <dcampeao@lncc.br> wrote in message <i99rbb\$ngu\$1@fred.mathworks.com>...
> Assuming that pdetool can handle the equation that you are dealing with.
> You can generate the geometry and boundary conditions in pdetool and compare against your own and check if they are correct. (using generic scalar or system depending on your problem)
> The solution is a vector! Even if you are working with the system case. In this way your solution will be U=[ux1 ux2 ux3.... uy1 uy2 uy3...].
> N is the number of degrees of freedom. Scalar case N=1, System case N=2.
> C represents the material properties. In heat conduction for example is the conductivity tensor, in elasticity is the constitutive tensor. It is explained how to write it in assempde function help.
> The 48s in b matrix represents the ascii notation for 0.
> The number of rows in c (nrc) depends on the problem... You should say how many rows are necessary.
> For example: In the heat problem if you use c=1; you are assuming that your material is isotropic and the conductivity tensor is k=[1 0; 0 1];
> In order to solve programmatically, keep in mind that:
> assema builds the stiffiness matrix, mass matrix and force vector
> assemb builds the boundary conditions
> assempde uses this two above functions to solve the problem.
> So, basically you need only assempde to solve a problem.
> Hope it helps!
```
 0

2 Replies
493 Views

Similiar Articles:

7/26/2012 5:55:37 AM