|
[Sponsors] |
December 9, 2019, 00:46 |
Restart simulation with different inflow
|
#1 |
New Member
Clemente
Join Date: Dec 2019
Posts: 8
Rep Power: 7 |
Hi all! I'm running a simulation with interFoam and I have a (maybe) dumb question. I'm trying to restart a simulation from the 30 second, but using a different inflow rate. I've tried copying the solution from the folder "30" into a folder named "0", changing the initialConditions file in the path "0/include". Nevertheless, the after running the simulation I can't see any change in the results, it's like the flow never increased.
I've looked in forums but the answers I've found are for restarting with the same flow. Can any of you help me please? Thanks in advance! |
|
December 9, 2019, 07:36 |
|
#2 |
Senior Member
Join Date: Jun 2012
Location: Germany, Bochum
Posts: 230
Rep Power: 16 |
you might want to post your files, but initialConditions are the conditions for the first guess at the flow field. You want to change your boundary conditions to increase the flow rate.
|
|
December 9, 2019, 07:48 |
|
#3 |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
Hi Clemente,
I would like to know, why you are copying the results into the 0 folder. You can resume your simulation from the latest time step, by editing your controlDict. As Mr. Bazinga told, you need to change the boundary conditions, to the new flow rate. You can edit your the BCs in the last time step, and continue the simulation from there onwards. |
|
December 9, 2019, 08:00 |
|
#4 | ||
New Member
Clemente
Join Date: Dec 2019
Posts: 8
Rep Power: 7 |
Hi Krao,
Thanks for your reply. Quote:
I'm doing it just to try something different, originally I just use the LatestTime setting in controlDict. Quote:
To do this I only have to replace the U file, or do I have to do something else? Thank you again!! |
|||
December 9, 2019, 08:03 |
|
#5 |
New Member
Clemente
Join Date: Dec 2019
Posts: 8
Rep Power: 7 |
Thank you Bazinga for replying! This are my files:
Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application interFoam; startFrom latestTime; startTime 0; stopAt endTime; endTime 100; deltaT 0.001; writeControl adjustableRunTime; writeInterval 0.1; purgeWrite 0; writeFormat binary; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep on; maxCo 0.1; maxAlphaCo 0.1; maxDeltaT 1; // ************************************************************************* // Code:
FoamFile { version 2.0; format ascii; class polyBoundaryMesh; location "constant/polyMesh"; object boundary; } 5 ( atmosphere { type patch; nFaces 89; startFace 3962; } inlet { type patch; nFaces 48; startFace 4051; } lowerWall { type wall; nFaces 128; startFace 4099; } outlet { type Unspecified; nFaces 19; startFace 4227; } BaseAndTop { type empty; nFaces 4104; startFace 4246; } ) Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "include/initialConditions" dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type variableHeightFlowRateInletVelocity; flowRate $inletFlowRate; alpha alpha.water; value uniform (0 0 0); } outlet { type zeroGradient; } lowerWall { type noSlip; } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } defaultFaces { type empty; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ inletFlowRate 60; pressure 0; turbulentKE 4.14e-03; turbulentEpsilon 4.39e-05; // ************************************************************************* // As I read from you and Krao, I have to change the last two files in the latestTime that was recorded, right? Thank you again! |
|
December 9, 2019, 08:12 |
|
#6 |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
Yes you need to edit the last two files, but I don't think they are required to be replaced.
Assuming that you have a fully developed flow at the latest time step, it is worth to make use of the simulation results obtained so far. So, I would insert the new values into the required part/patch, by editing the files in the required U/K/epsilon/P files in the latest time step folder. Or, if you think that would not make any sense, you can replace and continue. |
|
December 9, 2019, 08:24 |
|
#7 |
New Member
Clemente
Join Date: Dec 2019
Posts: 8
Rep Power: 7 |
ohh that's great! One last thing, there's any way to edit these files if they are written in binary, or do I have to write the results in ascii format only?
thanks again! |
|
December 9, 2019, 08:30 |
|
#8 |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
Not required, Binary is ok! But don't open these binary files in standard editors, as it makes the process slow. Use vi editor in your terminal to open and edit these files. Search for the particular patch and edit it. If you are not familiar with Linux terminal use the following link to explore more http://www.wolfdynamics.com/images/O...rash_intro.pdf
|
|
December 9, 2019, 08:35 |
|
#9 |
New Member
Clemente
Join Date: Dec 2019
Posts: 8
Rep Power: 7 |
Yes, I'm using Ubuntu actually. The thing is that when I use the vi editor to open these files I get something weird. Attached is an image, maybe I have to use another editor like vim?
|
|
December 9, 2019, 08:50 |
|
#10 |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
What you are getting is absolutely okay, try to search the required patch in the file. For example inlet patch.
|
|
December 9, 2019, 08:55 |
|
#11 |
New Member
Clemente
Join Date: Dec 2019
Posts: 8
Rep Power: 7 |
OMG you're right! hahaha I think that I just have to change the "flowRate", right?
|
|
December 9, 2019, 08:57 |
|
#12 |
Senior Member
Kmeti Rao
Join Date: May 2019
Posts: 145
Rep Power: 8 |
Yes you are ready to go from here!
|
|
December 9, 2019, 09:11 |
|
#13 |
New Member
Clemente
Join Date: Dec 2019
Posts: 8
Rep Power: 7 |
Thanks! I really appreciate your help! <3
|
|
Tags |
initial condition, interfoam, restart |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to restart simulation using results from other solver | sahmed | OpenFOAM Running, Solving & CFD | 8 | July 5, 2019 07:02 |
Mapping Field Data for Mesh Regions from Another Simulation | veterator | OpenFOAM Pre-Processing | 1 | July 10, 2018 06:28 |
restart the simulation | kmgraju | CFX | 2 | November 21, 2013 09:27 |
restart simulation | darookie | CFX | 8 | January 14, 2013 03:18 |
Error when restart simulation | zebu83 | OpenFOAM | 0 | October 20, 2009 05:30 |