I couldn't get the max iteration paramater

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd https://github.com/qingfengxia/Cfd and CfdOF https://github.com/jaheyns/CfdOF )

Moderator: oliveroxtoby

Post Reply
supahaka
Posts: 3
Joined: Sun Mar 13, 2022 12:50 am

I couldn't get the max iteration paramater

Post by supahaka »

In the screenshot below, we can see that I set max iterations to 20. There will be 4 output for t=0,0.01,0,0,02 and 0.03.
Untitled.png
Untitled.png (267.49 KiB) Viewed 1554 times

I asume it would take at most 80 iteration. But currently my simulation is at iteration 200+ and the output folder only has a subfolder for timestep 0
Screenshot 2022-04-01 at 11.50.37.png
Screenshot 2022-04-01 at 11.50.37.png (119.1 KiB) Viewed 1554 times
What have I done wrong?
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: I couldn't get the max iteration paramater

Post by oliveroxtoby »

supahaka wrote: Fri Apr 01, 2022 4:51 am In the screenshot below, we can see that I set max iterations to 20. There will be 4 output for t=0,0.01,0,0,02 and 0.03.

Untitled.png


I asume it would take at most 80 iteration. But currently my simulation is at iteration 200+ and the output folder only has a subfolder for timestep 0

Screenshot 2022-04-01 at 11.50.37.png
What have I done wrong?
The max iterations isn't actually used for the solver you are running. We use adaptive timestepping without outer iterations for the segregated solvers, so it is probably doing many small timesteps. If you look at the output on the report view you can see the time and delta t.
supahaka
Posts: 3
Joined: Sun Mar 13, 2022 12:50 am

Re: I couldn't get the max iteration paramater

Post by supahaka »

Thank you for your message

I am trying to do a proof of concept of how a machine learning method can be a surrogate model for such flow. In such POC, the temporal length of the simulation is much more important than the accuracy.

I am facing big a disadvantage due to limited computational resource. Therefore, I'd like to ask what are ways to make simulations run faster.

My simulation is about the flow of gas through a 50 cm pipeline. It should be a transient simulation. I have thought of options like:
- Increase max characateristic length: Currently 1 mm
- Increase convergence tolerance: Currently 0.01

As I have no experience on CFD (being a machine learning participant), could you suggest me anything?
thschrader
Veteran
Posts: 3129
Joined: Sat May 20, 2017 12:06 pm
Location: Germany

Re: I couldn't get the max iteration paramater

Post by thschrader »

supahaka wrote: Sun Apr 03, 2022 1:10 pm ...
Therefore, I'd like to ask what are ways to make simulations run faster.
...
Hi supahaka,
welcome to the FreeCAD-Forum.

Running a fast simulation:
- use a 2D mesh
- run a steady-state simulation
- avoid turbulence model

See example, bullet shooting through pipe.
example.FCStd
(20.85 KiB) Downloaded 36 times
Meshing/simulation approx 3 min on intel i5.
When you play the produced iterations in Paraview, you see the moving fluid in the wake of the bullet.
Which in fact is a fake. But the optical illusion suggests the "real" flow.
Maybe you can use this approch to train your AI.
Regards Thomas

BTW:
please update your cfdof-wb and cfmesh, there where several changes in the last days.
turbulence_faked.JPG
turbulence_faked.JPG (42.79 KiB) Viewed 1372 times
supahaka
Posts: 3
Joined: Sun Mar 13, 2022 12:50 am

Re: I couldn't get the max iteration paramater

Post by supahaka »

I am interested in the 2d rectangular domain. What should the "thickness" of the domain be? 0.1mm, 1mm, or what. Is there a criteria / range for it?
User avatar
oliveroxtoby
Posts: 810
Joined: Fri Dec 23, 2016 9:43 am
Location: South Africa

Re: I couldn't get the max iteration paramater

Post by oliveroxtoby »

supahaka wrote: Wed Apr 06, 2022 4:47 am I am interested in the 2d rectangular domain. What should the "thickness" of the domain be? 0.1mm, 1mm, or what. Is there a criteria / range for it?
It shouldn't make any difference for the simulation itself, but for the quickest meshing it's best if it's roughly the thickness of the base mesh spacing (since the meshing is done in 3D first and then extruded).
Post Reply