Initial Conditions for Temp and Velocity

Asked by Tom

Hi,

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 ?

Thanks

Tom

Question information

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

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 :
#2

Thanks Joel,

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

Thanks

Thom

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

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 :
#4

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