微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 电磁仿真讨论 > need help for solving 2D PDE by tridiagonal system by matlab

need help for solving 2D PDE by tridiagonal system by matlab

时间:03-31 整理:3721RD 点击:
Hi,
I have to solve a 2D partial differential equation. I have written it by Cranck-Nicolson method. Then for solving it I have to apply tridiagonal system or thomas algorithim. can you tell me how can I do that? Or send me any example.
Thank you.

Hi,
I too have to solve a 2D partial differential equation, preferably using Matlab. Mines a cubic. If anyone has given you a pointer, please lets pool our resources. I contacted Matlab, but they no longer understand it very well. I do not want to have to use the pdetool drawing method, I need to have a program that does it non-manually. I am calling routines like this (these are the error results from command window):
? Error using ==> feval
Undefined function or variable 'FileNamedInInitmeshCJ'.

Error in ==> pdeigeom at 37
x=feval(dl);

Error in ==> pdemgeomCJ at 9
nbs=pdeigeom(g); % Number of boundary segments

Error in ==> initmeshCJ at 148
[p,e,Hmin,factor]=pdemgeomCJ(g);

Error in ==> solveTheHpde3 at 73
[p,e,t]=initmeshCJ('FileNamedInInitmeshCJ');

This is probably failing as the parameter string 'FileNamedInInitmeshCJ', according to the pdegeom documentation, needs to be the 'Geometry Description', whatever that is, and its currently just a name I conjured up out of thin air. 'solveTheHpde3' is my module, the others , after taking off the 'CJ' append, are pre-written Matlab modules, taken from the pdetool directory (of R2007b).
I'll attach a file MatlabModuleCallsIsolatom.doc I created to try and explain to myself what I am doing / trying to do. It shows, in Microsoft Word OUTLINE VIEW, the calls and the interesting (to me) parts of the called module, before it calls the next. This is just for the area where I'm trying to solve the cubic 2D PDE, which is for the variable array h. (For my future reference this .doc file comes from the !isolatom directory in MyDocuments).
I'm getting nowhere fast after about a month and will be willing to work with you if you want to write a Matlab program to repeatedly solve and optimise a 2D PDE because that's what I have to do too. chris@thejohnses.plus.com
Good Luck,
Chris

Hi,
Still, I can't do it by matlab. I am also new in matlab. But now I am trying with clawpack. I don't know your equation will be suitable for it or not. But you can check it.

Best Wishes,
Sunipa

Thanks Sunipa.
Sorry, I misinformed you.
The Matlab PDE routines I'm trying to make use of are from the
pde directory in the
toolbox directory of the
release directory (R2007b in my case).
I'm not entirely new to Matlab but am new to trying solve a cubic 2D PDE using Matlab (or anything). My knowledge of Matlab is pretty pedestrian, although I've spent 2 years using it. But good enough until now.

Do you know if clawpack is callable from Matlab? When it says 'hyperbolic', is that in the same sense that Matlab use the word, i.e. including 2nd order time differential terms? I don't have any time differentials so what Matlab calls an 'elliptic' PDE type should be sufficient for me. That's about the only good thing I can see about my situation at present.

I need a facility that allows the coefficients of the 2D PDE as described in the Matlab 'system' method for solving a 'Matlab elliptic' 2D PDE, to be variables, as the array variable for which I'm trying to solve also appears as a cubic in the PDE equation.

I'll be sticking with Matlab for a while yet as my main program is written in Matlab and I have no desire to port that program. But if there is a (non-Matlab) 2D PDE routine allowing the use of variable coefficients, that I could call from Matlab, that might be where I will reluctantly have to go.

Please let me know if you too are having to use variable coefficients, although if you have any differentials in time I would unfortunately not expect your experience to be useful for me (nor mine for you).

Have fun (?),

Chris

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top