Comments (8)
AMAZING.
from butterfly.
Looking at the sample file
The controlDict has the file set to run for 1,000 timesteps. This might not be enough to achieve convergence.
The fVSolution is missing it's convergence criteria section for residual control. A residual is what is reported in the command line for every timestep. This is essentially measuring how much the solution for each variable has changed in comparison with the previous timestep. Once these changes become sufficiently small, we assume the solution has potentially achieved convergence. Commonly these will be set to 1e-5 for all variables. Often i'll set pressure to 1e-4 since it takes the longest to converge. Consider adding this as a default in the Butterfly component, but I think these should be user controllable as well. Faster simulations may use 1e-3 for criteria but this is likely not enough to achieve a converged solution.
Most CFD softwares include a way to visualize the residuals. Here's a painful image of a solution that is not converging very well
And here's an image of one that converged well
The simulation ends once the max timestep specified in the controlDict is reached, or when the convergence criteria is reached, whichever happens first.
I believe the boundary condition error in this sim is with p. All p boundary conditions are set to zeroGradient except the west_window which is set to a uniform 0. in U, it's clear the the west_window is the inlet. Setting the pressure to 0 should be for the window outlet. Think of the 0 as like setting the pressure of this area as the atmospheric pressure. For the flow in the room to be pushed out the east window, we want the entire room to have a higher pressure than what is outside.
Changing the p boundary condition in my sim made the results look much more physical
TLDR: the 0 pressure boundary condition should be specified at the outlet. in p, change west_window to zeroGradient type, and east_window to uniform 0 type.
from butterfly.
@stefan-buildSCI thanks for checking! 💯 Very helpful. Can you attach the updated folder here or upload it to github. It's much easier to update the code based on the files.
There is an open issues for convergence criteria #27 (comment). We should find a solution to plot the values as you mentioned. Reading text outputs won't really work. I will add that as a wish so we can add it soon.
from butterfly.
Just synced my changes to the study_room example
from butterfly.
Hello @mostaphaRoudsari @stefan-buildSCI
Thanks very much for your comments and additions, and for finding out the error stefan! It's certainly not a good idea to prepare CFD cases way past bedtime.
As Mostapha referenced, we are already planning to include the residual control as an exposed parameter to the user.
Concerning plotting the residuals there are a couple of choices here.
1.Using the pyFoam libraries and the pyFoamPlotRunner.py utility. This works in Linux but I haven't tested in windows. If we can setup pyFoam in windows I don't see why not (even though we'd probably need to link it to a plotting environment). Or wait, this is a VM so it should run smh. The command would be (for a parallel run of a simpleFoam case):
pyFoamPlotRunner.py mpirun -np 4 simpleFoam -parallel
This nifty utility will pop up different charts exactly like the ones you showed for residuals and continuity. pyFoam even allows the user to save vector (or image) files of the plots at the end!
2.We replicate the functionality of pyFoam library by following the terminal output (> log.txt kind of thing), extracting the necessary information from the output (e.g. the number for each residual in each iteration) and then plotting that with a windows (?) software. Now obviously this looks, and is really, like it is rediscovering the wheel. However, a way to visualize run-time information in Windows would be extremely valuable for the visualization of information created from function objects.
3.Third way, which is a compromise between the two or rather the most efficient way to go about no. 2 is to use the -residual function object of OF. This would write out residuals for each timestep in a file. This file (which would have a standard format) can then be visualized smh.
Hope this helps.
Kind regards,
Theodore.
from butterfly.
@stefan-buildSCI thanks! Are you sure that you synced the changes with github. It's not up here yet: https://github.com/mostaphaRoudsari/Butterfly/commits/master
from butterfly.
Not sure why it didn't show up, looks like it synced now though.
On Sun, Jul 10, 2016 at 7:17 PM, Mostapha Sadeghipour Roudsari <
[email protected]> wrote:
@stefan-buildSCI https://github.com/stefan-buildSCI thanks! Are you
sure that you synced the changes with github. It's not up here yet:
https://github.com/mostaphaRoudsari/Butterfly/commits/master—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#21 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AHafD2dtveUstrTgAES1kaRHXeosyw_9ks5qUae7gaJpZM4I7UL_
.
from butterfly.
@stefan-buildSCI @TheodoreGalanos I fixed the default values. Please open a new discussion for plotting residuals. Thank you for your help.
from butterfly.
Related Issues (20)
- Butterfly<1.solution exception:windowserror. hep!help! HOT 1
- blockmesh :1.solution exception:windowserror. Who can help me!!! HOT 4
- Solution exception: WindowsError HOT 2
- Running time for Butterfly HOT 3
- Runtime error (UnauthorizedAccessException): Access to the path is denied
- butterfly doesn't seem to wake up blueCFD HOT 1
- Butterfly, Rhino, and BlueCore2020? HOT 6
- 1. Solution exception:WindowsError (wind analysis)
- Butterfly BlueCFD Installation. Followed instructions for both but still receiving error '1. Solution exception: Failed to import butterfly: No module named butterfly_grasshopper.timer'
- Blockmesh Component Error HOT 2
- Blockmesh Component Error HOT 2
- SnappyHexMesh Failed!
- 1. Solution exception:'"C:\Program Files\blueCFD-Core-2020\setvars.bat"' is not recognized as an internal or external command, operable program or batch file HOT 1
- Deleted
- Solution exception:Failed to find points file at C:\Users\An'd's\butterfly\outdoor_airflow\constant\polyMesh
- help,butterfly block mesh is warning HOT 4
- AddLayers output empty with True input in SnappyHexMesh HOT 2
- Moving or dynamic mesh
- Butterfly Python API documentation link broken.
- Butterfly Help WindowsError HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from butterfly.