Is there a very simple 1d time evolution example?

Asked by Mike Witt

I'm just trying to get started with Fenics, and I'm also somewhat of a novice mathematically. It would help me a lot if I had an extremely simple example that I could match up against the kind of series solution that I've learned to do in class. I'm thinking of the simplest thing I can imagine, namely a one dimensional heat equation. Just:

d/dt u(x,t) = k d^2/dx^2 u(x,t)

with an initial value of say: u(x,0) = 1. Then running it forward in time to watch the temperature "collapse" over the interval. I would assume that this would only be a few lines of Fenics code.

I can't find anything like this in the book, or any of the examples. Does anyone happen to have this simple bit of code?

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Anders Logg (logg) said :
#1

On Wed, Apr 11, 2012 at 02:10:57AM -0000, Mike Witt wrote:
> New question #193259 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/193259
>
> I'm just trying to get started with Fenics, and I'm also somewhat of a novice mathematically. It would help me a lot if I had an extremely simple example that I could match up against the kind of series solution that I've learned to do in class. I'm thinking of the simplest thing I can imagine, namely a one dimensional heat equation. Just:
>
> d/dt u(x,t) = k d^2/dx^2 u(x,t)
>
> with an initial value of say: u(x,0) = 1. Then running it forward in time to watch the temperature "collapse" over the interval. I would assume that this would only be a few lines of Fenics code.
>
> I can't find anything like this in the book, or any of the examples. Does anyone happen to have this simple bit of code?

There are examples with analytical solutions in the Tutorial.

--
Anders

Can you help with this problem?

Provide an answer of your own, or ask Mike Witt for more information if necessary.

To post a message you must log in.