[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ff3d-users] Code to solve Fick's law, what's wrong??!!
From: |
Arun Viswanathan |
Subject: |
Re: [ff3d-users] Code to solve Fick's law, what's wrong??!! |
Date: |
Sat, 15 May 2004 08:24:31 -0700 (PDT) |
Hey Stephane,
I am so sorry to be bothering you so often, the whole
thing is new to me, that's why I have too many
doubts....here's yet another...:)...
In the example of the Euler's equation that you sent
me, 'dt' is simply declared as any other variable. In
my equation of Fick's law, I don't think I can do
that. The equation I am trying to solve goes this way:
d/dt [C(x,t)] = D * d^2/dx [C(x,t)]
where 'd/dt' is a partial derivative with respect to
't' and 'd^2/dx' is a second order partial derivative
with respect to 'x'.
I have coded this as 'dt(C) = D*div(grad(C))', but
'div(grad)' is in terms of 'x'. My doubt is how to
express it in terms of 'x' when the other term is
expressed in 't'?? I really appreciate your patience
with me and my queries.
Thanks so much. Best regards,
Arun.
--- Stephane Del Pino <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> > solve(C) in M
> > {
> > pde(C)
> > dt(C) = D * div(grad(C));
> > };
> You have to write the time discretization scheme by
> yourself.
> Here comes an implicit Euler scheme.
>
> function C0 = x*y*z;
> double dt = 0.1; // time step
> int i;
> for (i=0; i<5; ++i) {
> solve (C) in M
> {
> pde(u)
> C - div(dt*grad(C)) = C0;
> }
> C0 = C;
> }
>
> Best regards, Stephane.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
>
>
iD8DBQFAoz2MbZyhKhZwdc0RAvGRAJ9hFhxy66tqudwa7UALZ9326KKlngCg5u5T
> ehw7o/hltorYCMLYEnOI7mg=
> =0Kr1
> -----END PGP SIGNATURE-----
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/
- Re: [ff3d-users] Code to solve Fick's law, what's wrong??!!,
Arun Viswanathan <=
- Re: [ff3d-users] Code to solve Fick's law, what's wrong??!!, Stephane Del Pino, 2004/05/15
- Re: [ff3d-users] Code to solve Fick's law, what's wrong??!!, Arun Viswanathan, 2004/05/18
- Re: [ff3d-users] Code to solve Fick's law, what's wrong??!!, Arun Viswanathan, 2004/05/18
- Re: [ff3d-users] Code to solve Fick's law, what's wrong??!!, Stephane Del Pino, 2004/05/19
- Re: [ff3d-users] Code to solve Fick's law, what's wrong??!!, Arun Viswanathan, 2004/05/20
- Re: [ff3d-users] Code to solve Fick's law, what's wrong??!!, Stephane Del Pino, 2004/05/21