Initial Conditions for Temp and Velocity

Asked by Tom


I am solving for convection in porous media. My problem requires setting non-trivial initial conditions.

What options are there to specify the initial temperature and velocity fields ?

Ideally, I'd like to use matlab to generate a 3D field and import it as the initial condition. Is this possible ?



Question information

English Edit question
esys-escript Edit question
No assignee Edit question
Solved by:
Joel Fenwick
Last query:
Last reply:
Revision history for this message
Joel Fenwick (j-fenwick1) said :

All the coefficients for the PDE (and boundary conditions) are Data objects so the question becomes: can you get your fields into a Data object.

If you can express your field as a regular (3D) grid of values you can use the table interpolation function to get them into a Data object.

Revision history for this message
Tom (chienenrage3030) said :

Thanks Joel,

the grid of values: can/should I create that as a file saved as xml which is n rows by 3 columns ?



Revision history for this message
Best Joel Fenwick (j-fenwick1) said :

Long story short, it is not possible to create a new Data object directly from a file.
[Loading a previously saved object is different].

In order to use interpolation you would need to get the table you wished to use into a python array.
Doing that is left as an exercise for the reader.

Revision history for this message
Tom (chienenrage3030) said :

Thanks, I reckon I can make a python array of it...