|
[Sponsors] |
Restart InterDymFoam simulation from latestTime |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 8, 2019, 04:58 |
Restart InterDymFoam simulation from latestTime
|
#1 |
New Member
Giovanni
Join Date: Feb 2018
Posts: 2
Rep Power: 0 |
Hello everyone, let me introduce myself, my name is Giovanni and I am a OpenFoam user for just over a year and I am dealing with hull resistance forecasting for planing boats so I refer to the InterDymFoam solver.
I rely on the CINECA processors, and I write to you as I am having problems relaunching simulations from the last moments saved in the various "Processor" folders to complete the preset simulation time. There is a maximum rental time of the CINECA processors of 24 hours, and I am writing to ask you if you can tell me how I can do to restart the simulations because often the 24 hours are not enough for me. I forward you my initial script: rm -r 0 mkdir 0 cp -r 0.orig / * 0 / setFields if [$ # -eq 1]; then Nproc = $ 1 echo "Number of Processors to use:" $ NProc echo "numberOfSubdomains $ NProc;" > system / nproc rm -r postProcessing decomposePar -force mpirun -np $ NProc interDyMFoam -parallel reconstructPar -latestTime else echo "Number of Processors to use: Serial" rm -r postProcessing interDyMFoam fi To which I made the following changes for the raise: # rm -r 0 # mkdir 0 # cp -r 0.orig / * 0 / # setFields if [$ # -eq 1]; then Nproc = $ 1 echo "Number of Processors to use:" $ NProc echo "numberOfSubdomains $ NProc;" > system / nproc # rm -r postProcessing # decomposePar -force mpirun -np $ NProc interDyMFoam -parallel reconstructPar -latestTime else echo "Number of Processors to use: Serial" rm -r postProcessing interDyMFoam fi and this is the "ControlDict" library: /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "PuntoRifApplForze" application interDyMFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 24; deltaT 1e-6; writeControl adjustableRunTime; writeInterval 3; purgeWrite 0; writeFormat binary;//ascii; // writePrecision 6; writeCompression compressed;//uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 5; maxAlphaCo 2; maxDeltaT 0.01; functions { forces { type forces; functionObjectLibs ("libforces.so"); patches ("fiancoalto" "fiancobassofondo" "pattino" "skeg" "pontepoppa" "timone" "piattello"); p p; // Not required (default p) U U; // Not required (default U) log true; rho rho; // Not required (default rho) if rho is not calculated insert rhoInf rhoInf 998.2072; // Reference density, fluid CofR $CorF; // Origin for moment calculations writeControl timeStep; writeInterval 1; } forza_timone { type forces; functionObjectLibs ("libforces.so"); patches ("timone"); p p; // Not required (default p) U U; // Not required (default U) log true; rho rho; // Not required (default rho) if rho is not calculated insert rhoInf rhoInf 998.2072; // Reference density, fluid CofR $CorF; // Origin for moment calculations writeControl timeStep; writeInterval 1; } }; With this configuration the simulation restarts at the last saved instant, but the deltaT turns out to be considerably smaller than that of the last instant saved before the raise, leading to the explosion of the calculation and to the stop of the simulation Thank you. |
|
April 11, 2019, 04:25 |
|
#2 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20 |
Hi Giovanni,
I have not tested, but I am quite sure your restart problems are related to a bug in reconstructPar tool (see https://bugs.openfoam.org/view.php?id=2832 ). So you have different options:
Hope this helps, Jan |
|
April 11, 2019, 06:22 |
|
#3 |
New Member
Giovanni
Join Date: Feb 2018
Posts: 2
Rep Power: 0 |
Hi JNSN,
I thank you for the complete answer. I solved thanks to your help and adopting the 4.1 version. Thanks again, kind regards, Giovanni Donà |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with restart in FSI unsteady simulation | david_mocholi | SU2 | 1 | June 24, 2023 07:06 |
Mapping Field Data for Mesh Regions from Another Simulation | veterator | OpenFOAM Pre-Processing | 1 | July 10, 2018 06:28 |
Restart to adjoint for Unsteady Turbulence Cylinder flow | yweng3 | SU2 | 0 | October 7, 2016 15:50 |
restart the simulation | kmgraju | CFX | 2 | November 21, 2013 09:27 |
Error when restart simulation | zebu83 | OpenFOAM | 0 | October 20, 2009 05:30 |