Page 1 of 1

Interpolate data from a different mesh

Posted: Thu Nov 29, 2012 11:52 pm
by Sam Tabor
Hi there,

I am currently using Code Saturne as part of an optimisation study on PWR fuel rod subchannel mixing vanes. This involves running a lot of cases of subtly different meshes (produced by a parametric geometry definition and unstructured batch meshing). Is there any way to restart each case from a converged solution on a different mesh (so as to reduce the number of iterations required for convergence)? I am thinking of a function similar the 'Interpolate Data' function in Fluent. I think the restart option in Code Saturne will only work on the same mesh?

Many thanks
Sam Tabor

Re: Interpolate data from a different mesh

Posted: Fri Nov 30, 2012 2:39 am
by Yvan Fournier
Hello,

Yes, restart files are limited to using the same mesh.

The low-level infrastructure required for interpolation does exist in Code_Saturne, but is not directly usable for this yet.

If you need to do this for many calculations, writing a few user subroutines could help: you could use the Code_Saturne/Code_Saturne coupling infrastructure to "restart" a calculation coupling:
- the initial mesh, reading a restart file
- the new mesh, to which cell values can be interpolated, then writing a restart file

I beleive if you define a cell-based coupling, with all support / no coupled cells for the initial mesh, and the reverse for the new mesh, you should be able to do all of this from the cs_user_initialization file, using the varcpl routine (defined in src/base/cs_sat_coupling.c, used in src/base/cscelv.f90).

I am not sure whether you would need to try to run a single iteration for the coupled (receiving) mesh, and let it write its restart files normally (simplest, but might not work), or force output of a restart just after interpolation.

If you feel like trying this, I can help guide you through the basic steps, but I'll let you do most of the setup and testing.

Regards,

Yvan