Rick's Blog
OpenFOAM Baby Steps - Chapter 2: Cavity Flow
This entry starts with a simple 2D cavity flow walk-through.
DISCLAIMER:
This is not intended as a tutorial. This is my process for working through the available documentation in a manner that makes sense to me. Feel free to follow along, but realize that I am interpreting documentation that already exists.The OpenFOAM User Guide, starts with a tutorial on Lid-Driven Cavity Flow. There's a good overview of the blockMeshDict file and solvers without getting lost in the details. My initial results matched the User Guide, except for the shades of my color map. I didn't find a quick way to adjust the colors. The tutorial mid-point is green, while mine is yellow. That will be a future project!
The OpenFOAM User Guide, starts with a tutorial on Lid-Driven Cavity Flow. There's a good overview of the blockMeshDict file and solvers without getting lost in the details. My initial results matched the User Guide, except for the shades of my color map. I didn't find a quick way to adjust the colors. The tutorial mid-point is green, while mine is yellow. That will be a future project!
Fun Fact:
You can change the legend from the default vertical orientation to horizontal (or vice-versa) by grabbing and dragging it where you want it. It will automatically adjust orientation based on where you drag it.It seems like most of the interesting changes are happening in the top third or half of the cavity. OpenFOAM doesn't require square mesh, so I adjusted it. The user guide has a chapter on Mesh generation with the blockMesh utility. Paragraph 5.3.1.3 discusses the blocks and the ability to grade them. Instead of a simpleGrading of (1 1 1) (ie, consistent block size throughout the mesh), I changed it to (1 0.1 1). This will leave the block size consistent in the X and Z-directions, but in the Y-direction, the end blocks will be 10% of the beginning size. I can't see any difference in the computational results, but it makes me feel like I'm helping!
The vector plot description in the user guide gets slightly confusing because they use out of date images. However, if you read the text (crazy, i know!), they note the images are out of date and provide a description of the options to change.
The User Guide starts getting into making changes and different plots. This sounds like an excellent spot to declare victory. I'll come back to those changes later.
When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.
Comments