|
[Sponsors] |
June 24, 2014, 05:02 |
Read fvSolution every timestep
|
#1 |
New Member
Join Date: Mar 2014
Posts: 5
Rep Power: 12 |
Hello FOAMers,
I asked the same question in Running and Solving forum but I'm not sure if it was the right forum for my thread. I'm new in OpenFoam and i have a big problem. I'm writing my bachelor thesis in a company which want to use OpenFOAM instead of Fluent in future. It works fine, but OpenFoam is much slower than Fluent to find the solution. The calculation is running on a 64 core cluster and I'm using chtMultiRegionSimpleFoam. So i decided to implement a fuzzy algorithm control for the relaxation factors to get faster convergence and more stability. For the fuzzy algorithm it is necessary to write every timestep new relaxationfactors. But now I've a problems. The problem is that OpenFoam don't read the fvSolution every timestep which is necessary for my relax control algorithm. In the global controlDict i use timeStepMaster for fileModificationChecking. How can I ensure that OpenFoam reads the fvSolution every timestep? Please can anybody help me with my problem? thanks and best regards, Mike |
|
June 24, 2014, 05:49 |
|
#2 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18 |
hello,
In order to have run time modifiable fvSolution, just put "runTimeModifiable yes;" in your controlDict. However, if you want to speed up your case with chtMultiRegionSimpleFoam, you might try also to change solver for T (try GAMG if it work), and run first thermoFoam for a good initial T field. And this is weak coupling here, so for faster convergence, try congugateHeatSimpleFoam (from foam-extend) instead. regards, olivier |
|
June 24, 2014, 07:26 |
|
#3 | |
New Member
Join Date: Mar 2014
Posts: 5
Rep Power: 12 |
Quote:
hello oliver, thanks for your fast reply. I already have runtimeModifiable yes in my controlDict. OF reads the fvSolutions at runtime, but i think not before every timestep. My logFile looks like: Code:
Time = 1258 Solving for fluid region Air DILUPBiCG: Solving for Ux, Initial residual = 0.001473127, Final residual = 6.388003e-06, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.001077828, Final residual = 4.460612e-06, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.0007397743, Final residual = 3.149015e-06, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.00128943, Final residual = 8.301581e-05, No Iterations 14 Min/max T:362.9948 649.5947 DICPCG: Solving for p_rgh, Initial residual = 0.002547044, Final residual = 9.128748e-05, No Iterations 6 time step continuity errors : sum local = 0.0002680669, global = -3.173526e-05, cumulative = -0.01920438 Min/max rho:0.7 0.9575195 Solving for solid region LED_osram108_1b GAMG: Solving for h, Initial residual = 0.0002935136, Final residual = 1.034723e-11, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 406.7548 max(T) [0 0 0 1 0 0 0] 422.999 Solving for solid region Print GAMG: Solving for h, Initial residual = 0.0002210894, Final residual = 8.670698e-11, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 402.9372 max(T) [0 0 0 1 0 0 0] 407.0176 Solving for solid region Kuehlkoerper GAMG: Solving for h, Initial residual = 0.0004534505, Final residual = 1.119512e-10, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 402.3478 max(T) [0 0 0 1 0 0 0] 403.8735 Solving for solid region LED_osram108_1a GAMG: Solving for h, Initial residual = 0.0002873201, Final residual = 1.146439e-10, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 403.2385 max(T) [0 0 0 1 0 0 0] 418.1941 ExecutionTime = 647.37 s ClockTime = 665 s Time = 1259 Solving for fluid region Air DILUPBiCG: Solving for Ux, Initial residual = 0.001474693, Final residual = 6.37829e-06, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0.001076896, Final residual = 4.449169e-06, No Iterations 1 DILUPBiCG: Solving for Uz, Initial residual = 0.0007395095, Final residual = 3.140754e-06, No Iterations 1 DILUPBiCG: Solving for h, Initial residual = 0.001269364, Final residual = 8.975471e-05, No Iterations 19 Min/max T:362.9948 649.9584 DICPCG: Solving for p_rgh, Initial residual = 0.002549795, Final residual = 8.721853e-05, No Iterations 12 time step continuity errors : sum local = 0.0002561782, global = -2.981797e-05, cumulative = -0.01923419 Min/max rho:0.7 0.9575195 Solving for solid region LED_osram108_1b GAMG: Solving for h, Initial residual = 0.0002932964, Final residual = 1.033519e-11, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 406.7556 max(T) [0 0 0 1 0 0 0] 422.9998 Solving for solid region Print GAMG: Solving for h, Initial residual = 0.0002209446, Final residual = 8.658666e-11, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 402.9372 max(T) [0 0 0 1 0 0 0] 407.0184 Solving for solid region Kuehlkoerper GAMG: Solving for h, Initial residual = 0.000453174, Final residual = 1.116956e-10, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 402.3475 max(T) [0 0 0 1 0 0 0] 403.874 Solving for solid region LED_osram108_1a GAMG: Solving for h, Initial residual = 0.0002870728, Final residual = 1.144746e-10, No Iterations 1 Min/max T:min(T) [0 0 0 1 0 0 0] 403.2387 max(T) [0 0 0 1 0 0 0] 418.196 ExecutionTime = 647.52 s ClockTime = 665 s regIOobject::readIfModified() : Re-reading object fvSolution from file "/home/attrmi/Desktop/Simulation/processor0/../system/Air/fvSolution" regIOobject::readIfModified() : Re-reading object fvSolution from file "/home/attrmi/Desktop/Simulation/processor0/../system/LED_osram108_1a/fvSolution" regIOobject::readIfModified() : Re-reading object fvSolution from file "/home/attrmi/Desktop/Simulation/processor0/../system/Print/fvSolution" regIOobject::readIfModified() : Re-reading object fvSolution from file "/home/attrmi/Desktop/Simulation/processor0/../system/LED_osram108_1b/fvSolution" regIOobject::readIfModified() : Re-reading object fvSolution from file "/home/attrmi/Desktop/Simulation/processor0/../system/Kuehlkoerper/fvSolution" Time = 1260 best regards Mike |
||
June 28, 2014, 20:34 |
|
#4 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
If you are running the code on a cluster this might be a problem of the file system. Are you sure, that the fvSolution file has been written (modified) before the next time step started?
|
|
June 29, 2014, 04:48 |
|
#5 |
Senior Member
|
I would suggest to write a function object that gets the fvSolution dictionary from the mesh (or runTime) and alters it there. Hence you don't have to take that detour over the filesystem.
An other option would be to change the datastructure that actually takes care of storing and returning these relaxation factors, which would be the more elegant way. Look for solutionControl and it's derivatives. Jens |
|
June 29, 2014, 15:14 |
|
#6 | |
New Member
Join Date: Mar 2014
Posts: 5
Rep Power: 12 |
Quote:
regards, Mike |
||
June 30, 2014, 05:58 |
|
#7 | |
New Member
Join Date: Mar 2014
Posts: 5
Rep Power: 12 |
Quote:
Hello Jens, do you mean something like that http://foam.sourceforge.net/docs/cpp...0.html#details ? Do i have to write the new relaxFactors in the lib.so file? The second option sounds better but I'm not sure if I have enought know how of the OF structure to do that. I think it takes too much time for me to until i know what's to do. I have to finish my thesis until august otherwise i can't start with my master in september. regards, Mike |
||
June 18, 2020, 14:20 |
|
#8 | |
New Member
Suraj Pawar
Join Date: Sep 2013
Posts: 10
Rep Power: 13 |
Quote:
Thank you. |
||
Tags |
fvsolution, relaxation factor, runtime modifiable, timestep |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Read fvSolution every timestep | S2.Mike | OpenFOAM Running, Solving & CFD | 0 | June 23, 2014 06:53 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
999999 (../../src/mpsystem.c@1123):mpt_read: failed:errno = 11 | UDS_rambler | FLUENT | 2 | November 22, 2011 10:46 |
Timestep selection | Jindra Kosprdova | CFX | 9 | April 28, 2005 07:41 |
timestep in transinet simulations | caty | CFX | 1 | April 18, 2005 20:54 |