Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.
Complex PDE
Posted Jan 26, 2010, 12:45 p.m. EST 5 Replies
Please login with a confirmed email address before reporting spam
I have a complex set of three PDEs which I am trying to simulate in MATLAB:
Here are the equations:
da/dt=k1*(1/(1+s^m))*(a^n/(1+a^n))-a-d1/(1+Ta)*a*(1-c)+D1/c*da/dx(dotproduct)dc/dx
ds/dt=k2*c*(a^n/(1+a^n))-d2*s*D2*d2s/dx2
dc/dt=d1/(1+Ta)*c*(1-c)+D3*d2c/dx2
I have simulated with the PDE form before when I do not have the last term of the first equation. However, this term D1/c*da/dx(dotproduct)dc/dx makes the problem very complex. Can I do the simulations with the PDE app or do I have to start from scratch on an m file? If I do my own m file, what would the syntax be for this set of PDEs?
Any help would be greatly appreciated as I am having much difficulty with this.
Thank you,
Stephen
Please login with a confirmed email address before reporting spam
Sorry but I have some problems to understand you, could you be somewhat more explicit about your variables:
I understand that you have :
space variables and time: x, t
dependent variables : a, c, s all functions of (x,t)
constants: k1, k2, d1, d2, D1, D2, D3, Ta, n, m
to use COMSOL notations: da/dt = at, da/dx = ax, d^2s/dx^2 = sxx, etc.
You rewrite your expression to the type "something = 0" to be plug-in compatible with COMSOL
Now remains the "ax(dotprduct)cx" but if a=a(x,t) and the same for c, then isn't the "dotproduct" simply the scalar product ? If not isnt it just to write it out related to the variables I may have missed ?
I'm missing something essential here I believe ;)
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Your assumptions are all correct except T is a constant and a is the depedent variable. The term here in question is the dot product between the gradient of a and the gradient of c with D2/c being the coefficient. So, yes, this does give you a scalar, but this scalar is dependent on both space (since it depends on the gradients) and time (since both variables vary with time). My problem is that I do not know if there is a built-in module of this PDE type or if I need to do it from scratch. If I do it from scratch, I am not sure the proper notation as I have not seen anything like this in the manual.
Any help would be greatly appreciated,
Stephen
Please login with a confirmed email address before reporting spam
great then the "Ta" is a typo and should be read "T*a" with "T" a constant.
so the three equations become:
at=k1*(1/(1+s^m))*(a^n/(1+a^n))-a-d1/(1+T*a)*a*(1-c)+D1/c*ax*cx
st=k2*c*(a^n/(1+a^n))-d2*s*D2*sxx
ct=d1/(1+T*a)*c*(1-c)+D3*cxx
space variables: x,t
dependent variables: a,s,c
k1,d1,T,D1,k2,d2,D2,D3,m,n all constants and with implicit:
a=a(x,t) at=da(x,t)/dt ax=da(x,t)/dx ...
s=s(x,t) st=ds(x,t)/dt sx=ds(x,t)/dx sxx=d^2s(x,t)/dx^2 ...
c=c(x,t) ct=dc(x,t)/dt cx=dc(x,t)/dx cxx=d^2c(x,t)/dx^2 ...
So far I understand it, one must now reorder the equations with some algebra to get them to fit the canonical coefficient form of COMSOL, unfortunately I have not been playing that much with arbitrary PDEs and COMSOL so I would need some time to sort it out (if possible), and it's getting late form me just now. Furthermore, I still havnt catched the reason why the dotproduct, in this case makes it so much worse (I find it awfull enough as is, OK ;)
In anycase I would typically start to read through my copy of :
www.comsol.com/academic/books/mmwfem/
to be inspired. There are some good exercices therein starting from the PDE's and reordering them to be COMSOL compliant, so I can only propose that you borrow this book, or perhaps you have it already ?
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Stephen
Hi
great then the "Ta" is a typo and should be read "T*a" with "T" a constant.
so the three equations become:
at=k1*(1/(1+s^m))*(a^n/(1+a^n))-a-d1/(1+T*a)*a*(1-c)+D1/c*ax*cx
st=k2*c*(a^n/(1+a^n))-d2*s*D2*sxx
ct=d1/(1+T*a)*c*(1-c)+D3*cxx
space variables: x,t
dependent variables: a,s,c
k1,d1,T,D1,k2,d2,D2,D3,m,n all constants and with implicit:
a=a(x,t) at=da(x,t)/dt ax=da(x,t)/dx ...
s=s(x,t) st=ds(x,t)/dt sx=ds(x,t)/dx sxx=d^2s(x,t)/dx^2 ...
c=c(x,t) ct=dc(x,t)/dt cx=dc(x,t)/dx cxx=d^2c(x,t)/dx^2 ...
So far I understand it, one must now reorder the equations with some algebra to get them to fit the canonical coefficient form of COMSOL, unfortunately I have not been playing that much with arbitrary PDEs and COMSOL so I would need some time to sort it out (if possible), and it's getting late form me just now. Furthermore, I still havnt catched the reason why the dotproduct, in this case makes it so much worse (I find it awfull enough as is, OK ;)
In anycase I would typically start to read through my copy of :
www.comsol.com/academic/books/mmwfem/
to be inspired. There are some good exercices therein starting from the PDE's and reordering them to be COMSOL compliant, so I can only propose that you borrow this book, or perhaps you have it already ?
Good luck
Ivar
Please login with a confirmed email address before reporting spam
Stephen
Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.
Suggested Content
- BLOG Liquid Quenching with Film Boiling Simulation by AltaSim
- KNOWLEDGE BASE How does COMSOL Multiphysics handle complex-valued numbers and problems in the frequency domain?
- BLOG Equation-Based Modeling, a Custom Model of a Beating Heart
- FORUM implementation of Complex conjugate in PDE
- KNOWLEDGE BASE Troubleshooting Graphics Issues