Home Forums Daily Usage Archiving cases and sol2refresco for unsteady cases with deform grid

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Andrea Mikelic
    Participant
    Post count: 5

    Hi,

    I am busy working on archiving some old unsteady cases and I have the following questions. How to restart from a solution file with a different grid for unsteady computation when deform grid was used?

    My initial computation was using deform grid to put my vessel at trim and sinkage. After refresco to cgns, it created a sol-00001500_solution.cgns.
    At the end if I want to archive I have the original grid and the solution. I want to be able to maybe restart this computation in the future or with a different grid.

    If I use sol2refresco on that solution, and I specify the correct name in my control file (sol-00001500), it will create for 64 cores 64 files sol-00001500_000*_00064.data.
    However not the grid-00001500_00062_00064.geo.
    If I restart from that solution with the same trim and sinkage, ReFRESCO asks for the grid*.geo, the deformed grid.

    What should be done then? For archiving should we keep the deform grid and the solution for the time steps we want?
    Is there an option to save the deform grid with the solution?

    For the restart, Should we put 0 0 for the trim and sinkage and update the value later as the interpolation of sol2refresco is done with a non deformed grid (vessel even keel for instance)?

    Is there a better solution for that?

    Pierre Crepier
    Keymaster
    Post count: 14

    Hi Andrea,

    Archiving solution is indeed tricky when it comes to restarting the solution.

    In general here is what I would advise:

    If you want to restart, using the same grid, then you should export the CGNS file as a NFACE-n file (refresco2cgns with option -e=exportNFACE_n).
    Then you can use this file with cgns2refresco to re-create the .geo and .topo file.
    Finally you can use sol2refresco to create the .data files.

    If you want to restart using a different grid, then you must make sure that this new grid is at the same position as the original grid.
    Then use that grid to create the .geo and .topo (cgns2refesco)
    And, finally, run sol2refresco to get the .data

    General rules:
    cgns2refresco creates only .geo and .topo files.
    sol2refesco creates only .data files.

    Then now specifically for calm-water free-surface simulation, where the dynamic trim and sinkage was changed during the simulation:

    Either you generate the new grid directly at the proper trim and sinkage, then you do not have geometry problems.
    Or, you have to apply it. In this case:
    – run one iteration of the user code, with the target trim and sinkage values in the control file
    – Run refresco2cgns with the -e=exportNFACE_n option
    – use the generated CGNS file to run cgns2refresco

    Now the .geo and .topo you have have the proper geometry, at the target trim and sinkage.
    – run sol2refresco to interpolate the old grid (at updated trim and sinkage) on the new grid (also with correct trim and sinkage)

    To run the final simulation, you have two choices regarding the trim and sinkage values:
    – set them to zero and then, add the original values to obtain the correct values.
    – set them to what they actually are, and set the flag /controls/userCode/dynamicTrimAndSinkage/general/zeroOnRestart to true. This will not trigger a deformation at the first time-step after the restart.

    I hope what I wrote is clear because it is quite dense in terms of information and step to follow.

    Pierre

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.