Coarse to fine mesh interpolation

Extension of Elmer in computational glaciology
Post Reply
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

Coarse to fine mesh interpolation

Post by denis.cohen »

Hi everyone,

I'd like to interpolate results (velocity/pressure/temperature) from a coarse mesh onto a fine mesh.
Are there tools in Elmer/ElmerIce to do such operation?

Thanks

Denis Cohen
mzenker
Posts: 1999
Joined: 07 Dec 2009, 11:49
Location: Germany

Re: Coarse to fine mesh interpolation

Post by mzenker »

Hi,

ParaView can certainly do that.

HTH,

Matthias
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Coarse to fine mesh interpolation

Post by raback »

Hi Denis

There should be some machinery. Look at the routine "InterpolateMeshToMesh" among the source files.

This is automatically used assuming that you have two meshes where you have dependencies on field values. If you request a variable and that variable has been computed in the other mesh this will be interpolated from the other mesh.

For some hints how this could work look at the test case "multimesh". Basically you just need to introduce the other mesh in a solver section and ask for the variables.

-Peter
Martina
Posts: 39
Joined: 17 Apr 2013, 14:06
Antispam: Yes

Re: Coarse to fine mesh interpolation

Post by Martina »

Hi Denis,

what do you want to do? Just interpolating for postprocessing, restarting simulations on this finer mesh or only using certain variables in a new simulation?

If you want to do a real restart there is a Mesh2Mesh Solver (I'm not sure about the exact name/spelling and can't find it in the documentation currently). There is some posts in the forum, if you search for Mesh2Mesh or MeshToMesh.
Edit: I just saw, Peter was quicker me, so apparently it's InterpolateMeshToMesh.

If it's only for output purpose, you could write with SaveGridData your output on a finer (however regular) grid (ascii or paraview files).

I think both Solvers have (or had at least) limitations when using in parallel.

If you only want to use some variables in a new simulation with a different mesh, you could write them to ascii at the end of the first simulation and read/interpolate them at the beginning of another run with the different mesh with one of the ascii readers. (Not sure if that works for full 3D fields, I have done it only for variables on surface or bedrock.)

Martina
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

Re: Coarse to fine mesh interpolation

Post by denis.cohen »

Hi everyone,

Thanks for all your response.
I'll try your suggestions and get back to you.
I do want to interpolate to restart a new simulation on a finer mesh.

Thanks

Denis
denis.cohen
Posts: 56
Joined: 15 Dec 2010, 13:50

Re: Coarse to fine mesh interpolation

Post by denis.cohen »

Hi again,

Does this Mesh2Mesh works in parallel?
Problem is that I don't have the same number of processors in my coarse mesh runs than in my fine mesh runs.
Is this going to work or am I asking for too much?

Thanks

Denis
Martina
Posts: 39
Joined: 17 Apr 2013, 14:06
Antispam: Yes

Re: Coarse to fine mesh interpolation

Post by Martina »

Hi Denis,

I do not know if Mesh2Mesh works in parallel, I remember a post in the forum which says "probably not".

But I have never heart about a possibility to change the number of processors - even without changeing the mesh. If such a possibility exists, I would be happy to hear about it!
When I changed the number of processors in a run, I always either started from scratch or wrote and read some variables to and from ascii.

Maybe you could manipulate the .result files outside of Elmer if you really need to?

I fear that you are asking for too much,

Martina
Post Reply