solving a system of COUPLED partial differential equations

"Hello,

I'm trying to solve a system of 3 partial differential equations (3 diffusion equations, 2nd law of Fick) using ode15s! First of all, I transformed my system in an ODE system using the finite difference method to discretize each equation. After, I attached the boundary conditions , that after the discretization are become algebraic equations , and so in the end I' m obliged to solve a DAE system. From my readings I understood that I have to use ode15s to solve M*y'=f(t,y)! I defined the matrix M, by putting 0 where ever I have an algebraic equation, and I 've created a separate function file for f(t,y), in which I defined the coefficients of the variables. The function f(t,y) has the form B(n,n)*C(n), where B is the matrix with the variable's coefficients and C is the variable vector!
After the first run of the code I obtained negative results so I thought that it's best to adimensionalize the variables, and I did so, and now I'm confronting with a warning message :'Warning: Failure at t=3.124127e+00. Unable to meet integration tolerances without reducing the step
size below the smallest value allowed (7.105427e-15) at time t. '' . I know that the coefficient 's matrix is ill conditionned but what I don't know is how to handle this problem!""


I forgot to mention that the equations are coupled and that I'm trying to simulate the transfer of a specie through three different phases ( that's why I have 3 basic diffusion equations). 
0
Alina
6/1/2010 1:54:04 PM
comp.soft-sys.matlab 207257 articles. 1 followers. lunamoonmoon (258) is leader. Post Follow

2 Replies
1256 Views

Similar Articles

[PageSpeed] 24
> "Hello,
> 
> I'm trying to solve a system of 3 partial
> differential equations (3 diffusion equations, 2nd
> law of Fick) using ode15s! First of all, I
> transformed my system in an ODE system using the
> finite difference method to discretize each equation.
> After, I attached the boundary conditions , that
> after the discretization are become algebraic
> equations , and so in the end I' m obliged to solve a
> DAE system. From my readings I understood that I have
> to use ode15s to solve M*y'=f(t,y)! I defined the
> matrix M, by putting 0 where ever I have an algebraic
> equation, and I 've created a separate function file
> for f(t,y), in which I defined the coefficients of
> the variables. The function f(t,y) has the form
> B(n,n)*C(n), where B is the matrix with the
> variable's coefficients and C is the variable vector!
> After the first run of the code I obtained negative
> results so I thought that it's best to
> adimensionalize the variables, and I did so, and now
> I'm confronting with a warning message :'Warning:
> Failure at t=3.124127e+00. Unable to meet integration
> tolerances without reducing the step
> size below the smallest value allowed (7.105427e-15)
> at time t. '' . I know that the coefficient 's matrix
> is ill conditionned but what I don't know is how to
> handle this problem!""
> 
> 
> I forgot to mention that the equations are coupled
> and that I'm trying to simulate the transfer of a
> specie through three different phases ( that's why I
> have 3 basic diffusion equations). 


Did you try MATLAB's pdepe ?

Best wishes
Torsten.
0
Torsten
6/1/2010 11:16:08 AM
Torsten Hennig <Torsten.Hennig@umsicht.fhg.de> wrote in message <735098493.260351.1275405399232.JavaMail.root@gallium.mathforum.org>...
> > "Hello,
> > 
> > I'm trying to solve a system of 3 partial
> > differential equations (3 diffusion equations, 2nd
> > law of Fick) using ode15s! First of all, I
> > transformed my system in an ODE system using the
> > finite difference method to discretize each equation.
> > After, I attached the boundary conditions , that
> > after the discretization are become algebraic
> > equations , and so in the end I' m obliged to solve a
> > DAE system. From my readings I understood that I have
> > to use ode15s to solve M*y'=f(t,y)! I defined the
> > matrix M, by putting 0 where ever I have an algebraic
> > equation, and I 've created a separate function file
> > for f(t,y), in which I defined the coefficients of
> > the variables. The function f(t,y) has the form
> > B(n,n)*C(n), where B is the matrix with the
> > variable's coefficients and C is the variable vector!
> > After the first run of the code I obtained negative
> > results so I thought that it's best to
> > adimensionalize the variables, and I did so, and now
> > I'm confronting with a warning message :'Warning:
> > Failure at t=3.124127e+00. Unable to meet integration
> > tolerances without reducing the step
> > size below the smallest value allowed (7.105427e-15)
> > at time t. '' . I know that the coefficient 's matrix
> > is ill conditionned but what I don't know is how to
> > handle this problem!""
> > 
> > 
> > I forgot to mention that the equations are coupled
> > and that I'm trying to simulate the transfer of a
> > specie through three different phases ( that's why I
> > have 3 basic diffusion equations). 
> 
> 
> Did you try MATLAB's pdepe ?
> 
> Best wishes
> Torsten.


Hello,
So I did what you told me and the answer form matlab is :
''aliq =

   1.0000e+00   1.0000e+00   1.0000e+00   1.0000e+00   1.0000e+00
   1.0000e+00   1.0000e+00   1.0000e+00   9.9999e-01   9.9357e-01
   1.0000e+00   1.0000e+00   1.0000e+00   9.9996e-01   9.8743e-01
   1.0000e+00   1.0000e+00   1.0000e+00   9.9990e-01   9.8149e-01
   1.0000e+00   1.0000e+00   1.0000e+00   9.9983e-01   9.7574e-01
   1.0000e+00   1.0000e+00   1.0000e+00   9.9974e-01   9.7013e-01
   1.0000e+00   1.0000e+00   1.0000e+00   9.9963e-01   9.6466e-01
   1.0000e+00   1.0000e+00   1.0000e+00   9.9950e-01   9.5932e-01
   1.0000e+00   1.0000e+00   9.9999e-01   9.9936e-01   9.5414e-01
   1.0000e+00   1.0000e+00   9.9999e-01   9.9920e-01   9.4951e-01
==   1.0000e+00   1.0000e+00   9.9999e-01   9.9903e-01   9.5065e-01=== 11th time step
   1.0000e+00   1.0000e+00   9.9999e-01   9.9894e-01   1.0235e+00
  1.0000e+00   1.0000e+00   1.0000e+00   1.0166e+00   1.4504e+01
   1.0000e+00   1.0000e+00   1.0003e+00   1.2295e+00   1.7303e+02
   1.0000e+00   1.0000e+00   1.0039e+00   3.9296e+00   2.1823e+03
   1.0000e+00   1.0001e+00   1.0499e+00   3.8166e+01   2.7658e+04''
it seems that is  working well until it reach  the 11th time step! Anyway I know that my J matrix is not stable because the rcond is 1.475e-10, but from my point of view my equations are written correctly. 
I tried to use' pdepe ' but I have problems to impose two conditions at the same boundary ( that are the flow continuity and an equilibrium condition; the flow continuity is like : D_liq*dcliq/dx=D_gaz*dcgaz/dx (x= liquid height )  and cgaz=P*cliq, where P is a  partition coefficient)! 
Thank you very much for answering me and if you have any other ideas please tell me!
Best regards,
A. Stoian
0
Alina
6/7/2010 10:02:05 AM
Reply:
Similar Artilces:

trans-dsline file equation format?
Hi all, can someone please refresh my memory? I need to issue a file equation that points to a file on the other side of a DS connection. I create the connection via yoda:dsline h=3Dhobbes remote :H hobbes:hello... hobbes::=20 yoda:file x=3Dnpconfig.pub.sys:H yoda:dif i *x o npconfig.pub.sys x no difference msg; I just made changes and want to see the other diffs too! I seem to recall there being a clause similar to file x=3Dnpconfig.pub.sys;dev=3D<DS environment name??>#Disk I know it's not a dif issue; I've seen this work in the past. TIA Tra...

[Info-Ingres] Orphaned System Generated Indexes
This is a multi-part message in MIME format. ------_=_NextPart_001_01CAD721.E4C3862A Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-WatchGuard-AntiVirus: part scanned. clean action=allow Hi All, =20 I have a table which has 5 system generated indexes. AFAIK only constraints which do not specify an index can have a system generated index created. But there are only two constraints on the table, and the catalogs indicate that two of the secondary indexes are tied to these constraints. =20 That leaves three seemingly...

solve the questions
i am beginer in vc++.i want help in the following questions. 1. How can i create database program using sql server through codings.If we want DSN name it also create through codings. if u have any easy sample program please sent the following mail id. nevis_soft@yahoo.co.in "nevis" <nevis_soft@yahoo.co.in> wrote in message news:e5011219.0405310413.6c3b9785@posting.google.com... > i am beginer in vc++.i want help in the following questions. > 1. > How can i create database program using sql server through codings.If > we want DSN name it also create through codi...

Can you solve this in matlab2009b 64 bit? (systems of equations to be solved using "solve")
Hi all, Can you solve the following in matlab 2009b 64 bit (macosx with snow leopard)? I get the errors given below the code. It takes a lot of time before Matlab gives the error. Where do I go wrong? %----------------------- syms p0 p00 p1 p2 cn cr dn dr a an ar bn br T tau real; myfun = [ -(tau*(2*an + 2*bn*cn - 4*bn*p1 - dn*tau))/2; -(tau*(2*ar + 2*br*cr - 4*br*p0 - dr*tau))/2; ((T - tau)*(T*dn - 2*an - 2*bn*cn + 4*bn*p2 + dn*tau))/2; ((T - tau)*(T*dr - 2*ar - 2*br*cr + 4*br*p00 + dr*tau))/2; an*p2 - an*p1 - ar*p0 + ar*p00 + bn*p1^2 - bn*p2^2 + br*p0^2 - br*p00^2 - bn*cn*p1 + bn*c...

solving an array of equations with solve
Hello, I want to find zeros of a system of equations, eq=[eq(1),..,eq(n)]. But solve(eq) doesn't seem to work here, yet solve(eq(1),..,eq(n)) does. Suggestions? Thanks. ...

Does anybody use System Generator for DSP 8503
Hi, I'm an Electronic Engineering student and I'm doing my Thesis using System Generator for DSP v3.1 service pack 1. I've done my model in Simulink and tested that it works. Later I generate the netlist wihtout problems but when I try to synthesize in ISE 5.1 usin the XST VHDL desing flow lots of warnings appear. Above all this warnings; WARNING:Xst:37 - Unknown property "syn_black_box". WARNING:Xst:37 - Unknown property "fpga_dont_touch". And many others like signals asigned but never used. Why is the reason this warning appear? What should I do? Anybody could...

System News for Sun Users: TOC Vol 127 Issue 1: September 1 to September 7
The "System News for Sun Users" newsletters are sent each week to 50,000+ subscribers around the world. It is also posted to several newsgroups and to http://sun.systemnews.com You are encouraged to sign up for your own subscription to have a tailored newsletter delivered to you via email. The newsletter is built dynamically for each subscriber. You choose the technology areas that interest you. Each week the news is grouped into sections. Your newsletter is built from the sections that are available that match your selections. Current sections include: News, Feature...

Need a solved genetic algorithm example problem for Optimization
Greetings. I am teaching a class on Engineering Optimization to undergraduate students. During the last week of classes, I want to cover some non-traditional optimization topics such as Simulated Annealing, Generic Algorithms, Taguchi Methods, and the like. I am looking for a fully solved example problem that uses genetic algorithms. The problem can involve any particular application - backpack problem, traveling salesman problem, and so on. It does not have to be fancy. However, I do need the m-code so that I can run it - and maybe single step in debug mode - in front of the class. Sadl...

US-TX-Austin,: Firmware Developer, Real time embedded systems, C, File Systems (45339257610)
US-TX-Austin,: Firmware Developer, Real time embedded systems, C, File Systems (45339257610) ============================================================================================ Position: Firmware Developer Reference: JGG00044 Location: Austin, TX Duration: contract to possible perm Skills: BS in Computer Science/Electrical Engineering or Equivalent Experience Required: 5 years of experience Real time embedded systems High proficiency in C Strong knowledge of assembl...

Multi-Lingual Template and Menu System for Web Sites via Dreamweaver MX
Product Announcement: Multi-Lingual web site using Nested Templates and Menus http://www.decloak.com/Products/Dreamweaver/NestedTemplates/ You can see the TONGUES of FIRE demo web site at http://www.decloak.com/Products/Dreamweaver/NestedTemplates/Demos/NestedT_Tongues_of_Fire/ This name is from the BIBLE, "...every man heard them speak in his own language." Acts 2:1-12 NIV NOTE: The POINT is to be able to do a web site with multiple-languages... IT WILL still NEED human translators....but this will be still very effective and it can do a lot of languages and update...

Multi-carts and Flash carts on classic systems #2
I have a large collection of classic units, and large collection of game carts for each one. I would like to box up alot of my carts and put them in storage to make some room around here. I was wondering if there are any solutions for these systems or better ones than I have found so far. Commodore 64: Somebody recomended a Retro Replay, does this hold alot of rom images? If not, I'll have to research in running them off the floppy drive. Vic-20: Found nothing so far, but would it work to have a 24k ram board and run carts off the disk drive? Atari 8bit: I have a Flash Max!! Atari 7800...

US-VA-Reston: Security Systems Integrator: MLS/One way trusts, DCID 6/3; Perm (45294757608)
US-VA-Reston: Security Systems Integrator: MLS/One way trusts, DCID 6/3; Perm (45294757608) =========================================================================================== Position: Security Systems Integrator Reference: SMC01288 Location: Reston VA Duration: Perm Skills: 4 + years hands_on experience with operational systems using MLS and one way trusts, DCID 6/3 (and appropriate IC interpretations), IPT environment. Multi Level Security design, implementation, and/or operations. Six Sigma t...

WANTED: alphaSyntauri or Soundchaser System.
Looking to get ahold of an alphaSyntauri, or Soundchaser system. If you have one of these available, please send me an e-mail. Thanks! - Peter there's one on Epay right now, not my auction ...

Multi-boot liveCDs solved!
Multi-boot liveCDs solved!!!!!!!! http://www.pcquest.com/content/enterprise/2005/105070101.asp (link from http://www.livedistro.org) Hats off to Mr. Anindya Roy for taking simple liveCDs and putting them together into different directories a big DVD and then make the DVD multi-boot so as to boot any of those liveCDs!!!!! I've been waiting a year for this solution - and its so simple! It could have (and probably have been) done ages ago. Now you can show burn a single DVD (or CD) with many liveCD distros as you want and the choose which one to run from menu. Never leave home without you...

Trying to update on RPG III system
I am a somewhat new RPG "programmer", and I work in a total RPG III environment. I have been trying to get into the RGP ILE programming but I find it hard to do without having other ILE programs to work with. There is very little programming I do that doesn't involve the old programs on our system. Is there any way I can use a RPG ILE program with the RPG III programs that I have, without rewriting the existing code. I can do small basic stand alone programs but I can't use the newer coding in my daily old code. I have tried converting some RPG III programs to ILE and using t...

Data structure in system call/user program
Hi all I am doing an academic assignment which requires me to copy some data from *(current->mm) into an user program through the system call memorymap(struct mm_struct *mymap). As part of the assignemnt, i am supposed to create both the user program (which tests the system call) and the system call itself. After some thinking, I believe that I have a few options: 1) declaring "mm_struct mymap" in user program and then pass it into the system call. However, this pose a problem because many compilation errors occur when I try including "sched.c" into...

System profile?
How do I find out, from within a debian linux shell, what kind of memory I have in my computer? It's a remote server and I need to order more memory, how do I know what to order? Yeah, maybe I should keep track of this on my own accord, but I haven't :) I'm looking for a command line tool that outputs information about the system, like processor speed and type, memory, fsb and that sort of things. Thanks for help in advance. -- Sandman[.net] In article <mr-69F12A.16415302092005@individual.net>, Sandman wrote: > How do I find out, from within a debian linux shell, ...

Solving an integral for an unknown function
Dear All, I wonder if anyone could let me know if there is a general solution to the following problem in Mathematica. Suppose the functions g[u,w] and h[w] are known. I want to find a function f[u] such that Integrate[g[u,w]*f[u],{u,0,1}]=h[w]. In addition I know that Integrate[f[u],{u,0,1}]=2 and Integrate[u*f[u],{u,0,1}]=1. Is it possible to solve the above for the unknown function f[u]? Of course there might be several solutions but I would be happy to find one. Many thanks in advance for any suggestions. Mikael ...

solving with inverse functions/inexact coefficients
I'm trying to solve a set of simultaneous equations describing a laser cavity. A much simplified set of equations in Real unknowns F1, F2 and NU looks like this: F2 == Exp[0.76 NU] F1, F1 == 0.5 F2 Exp[0.76 NU], 0.5 F2 + NU == 15 They can be solved by hand very easily with two solutions, {F1=F2=0 && NU = 15} and {NU=0.46, F1=14.5, F2=29.1} Now Solve cannot solve these equations unless I change both instances of 0.76 to integers. Reduce seems to hang (or at least take too long to return and answer). Reduce can solve the problem quickly if I change both instances of 0.76 t...

SN#13841 Japan Chooses Sun Java[TM] Desktop System
SYSTEM NEWS FOR SUN USERS Vol 81 Issue 3 2004-11-15 Article 13841 from section "Features" Selected for Open Desktop Environment Initiative The Japanese Ministry of Economy, Trade and Industry (METI) is endorsing the Sun Java[TM] Desktop System for its country's open source software verification program in educational institutions organized by the Information-technology Promotion Agency in Japan (IPA). This Sun solution was selected as the platform of choice in a recent open competition. Details at http://sun.systemnews.com/...

Lowest Cost GPS Tracking System on the Market
Polaris - Lowest Cost GPS Tracking System on the Market CloserWorlds introduces Polaris, a low cost product / service for tracking an object's physical location in real-time over the Internet and displaying its position on a geographical map. Polaris can be used to track vehicles on the road, ships, planes, trains, humans and even animals. It is a generic system that consists of an XML web service and software running on a client's computer. Hardware located on the tracked object transmits the location periodically to the web service which forwards it to the customer's...

Partial Workaround for Leopard MATLAB Focus Bug
As Leopard users know, switching to MATLAB via Cmd-Tab does not focus the MATLAB window. As a workaround to click by mouse, I enabled mouse keys in the Assistive Devices section in System Prefs, and instead of clicking, I can focus the window by pressing 5 in the numeric keypad. This might help people who don't want to use mouse. Ustun ...

svm solve everything
MySVMLIB and MySEMLIB Copyright (C) 2007 Zhi-Jie He The LIB for SVM and OC-SVM training A fast and parameter-free SVM training algorithm with direct generalized performance control is achieved. By integrating kernel caching, shrinking and using second order information, a fast QP trainer is achieved. For traditional two-class SVM, the generalized error bound derived from SLT is calculated and minimized for the selection of parameters, with ZQP method and parallel method to speed up the process. For one-class SVM, a compression criterion is proposed and used to search the best kernel width au...

Best System to Run 3D Studio most efficiently
Assuming unlimited budget, what is the best system for running 3d studio most efficiently? kimmy wrote: > > Assuming unlimited budget, what is the best system for running 3d > studio most efficiently? You might take a look at some of the systems that Boxx Tech sells - but that's assuming you're serious about having a unlimited budget...... www.boxxtech.com/ Martin ...

designing a GA for solving general network routing problems.
Respected sir/madam Suppose i have a General computer networks independent of Topologies.I want to find the shortest path from source to destination through GA but using GA..... I don't know the use of GA chromosome encoding and fitness functions in matlab. what u suggest. thanking you ...........help me dear plz........ ...