Boundary Conditions and Solver Settings
What You'll Learn
- 1Match each boundary condition type to the physics at that location
- 2Avoid over-specifying conditions that make the problem ill-posed
- 3Initialize and ramp a solution toward convergence
- 4Diagnose residuals that fall but never reach a meaningful level
Most diverging CFD cases fail at the boundaries, not in the interior. Specifying both velocity and pressure at an inlet, or placing a fully developed profile at a far field edge, over-constrains the problem so the solver cannot satisfy it. This lesson pairs each boundary type with the physics it represents, explains why too much information is as bad as too little, and sets out an initialization and under-relaxation sequence that converges without stalling. The rules are solver independent, so they transfer directly between packages. The rules apply to every solver, so they transfer directly between packages.
Matching Conditions to Physics
A boundary condition states what the flow knows at the edge of the domain, so supply exactly the information that physically arrives there. At a subsonic inlet one scalar carries information in, so specify velocity or mass flow and let pressure float. At a subsonic outlet specify static pressure and let velocity convect out.
Walls use no slip for viscous flows with fixed temperature or fixed heat flux. Symmetry requires zero normal velocity and zero normal gradient of everything else, and applying it to an asymmetric flow imposes error. Periodic conditions suit fully developed duct flow and cascade passages.
Over-Specification and Domain Extent
An incompressible solver needs one pressure reference somewhere, because the equations determine only pressure differences. Fixing pressure at both ends forces a gradient the velocity field may not satisfy, and the usual symptom is a mass imbalance that never drops below a percent; specify a reference level at one end only.
Far field boundaries for external aerodynamics carry the freestream state and must sit far enough away that blockage is negligible. The test is simple: double the domain and confirm force coefficients move by less than a percent.
Initialization, Ramp, and Relaxation
Start from a field close to the expected answer rather than from zeros, initializing velocity at the inlet value and pressure with a hydrostatic profile. For buoyancy, compressible, or rotating cases, solve a simplified version first and use that result as the starting point.
Under-relaxation factors control how much each variable changes per iteration. Defaults of 0.3 for momentum and 0.7 for pressure and turbulence give a stable segregated solve; dropping momentum to 0.1 helps an unstable start, and raising it once residuals fall speeds the final approach.
Reading Residuals Honestly
| Indicator | Healthy behavior | Warning sign |
|---|---|---|
| Mass residual | Falls several orders | Flat above 1e-3 |
| Momentum residuals | Falls three to four orders | Oscillates with no trend |
| Outlet imbalance | Below 0.1 percent | Steadily above 1 percent |
| Quantity of interest | Settles to a plateau | Still drifting at the end |
Residuals falling is necessary but not sufficient. The quantity you will report, whether lift coefficient, pressure drop, or a flow split, must plateau, and global mass imbalance must close.
Real-World Examples
- Duct with unknown profile - Specify mass flow at the inlet and static pressure at the outlet, then let the profile develop over 20 diameters.
- External car aerodynamics - Far field boundaries two car lengths upstream and four downstream change drag coefficient by less than 1 percent.
- Centrifugal pump stage - Give the inlet uniform velocity at 5 percent turbulence intensity and monitor head rather than residuals alone.
đĄMonitor What You Will Report
Common Mistakes
Specifying velocity and pressure at one boundary
Fix: Supply only the information that physically enters there and let the rest respond to the interior.
Accepting a four-decimal residual drop
Fix: Confirm the target quantity has plateaued and imbalance is below 0.1 percent first.
Leaving the default domain size for external flow
Fix: Extend the far field and compare forces on two sizes before trusting the answer.
Key Takeaways
- Boundary conditions must state exactly the information that physically crosses each boundary.
- Over-specified systems appear as persistent mass imbalance rather than an explicit error.
- Initialization and under-relaxation decide whether a strongly nonlinear case converges at all.
- Residuals measure equation satisfaction; monitored quantities measure whether the answer is finished.
Frequently Asked Questions
Why does the solver need a pressure reference?
Incompressible equations contain only pressure gradients, so pressure is defined up to a constant and one value must be pinned.
When is a symmetry plane acceptable?
Only when geometry, boundary conditions, and expected flow are all symmetric; otherwise it forces an unphysical mirror solution.
How do I know the outlet is far enough?
Move it farther and check whether drag changes; a shift above 1 percent means the boundary still influences the wake.
Interview Questions
Q1: A case diverges in the first twenty iterations. What do you check?
Verify boundary consistency and units, confirm first cell y-plus matches the wall treatment, then lower momentum under-relaxation and reinitialize.
Q2: How do you set turbulence quantities at an inlet?
Use turbulence intensity and a length scale or hydraulic diameter, convert to k and epsilon or omega, and prefer 5 to 10 percent intensity for separated flows.
Extended Learning: Beyond the Basics
Key Concepts Summary
This lesson covers fundamental concepts that serve as building blocks for more advanced topics. Master these basics before moving to intermediate and advanced material.
Prerequisite Knowledge
Before studying this topic in depth, ensure you understand:
- Basic definitions and terminology
- Core formulas and their derivations
- Common applications in real-world scenarios
- Typical pitfalls and misconceptions
Step-by-Step Walkthrough
Let us work through a complete example to solidify understanding:
Step 1: Identify the problem type. Determine which category this problem falls into and which approach is most appropriate.
Step 2: Apply the relevant formula. Substitute known values into the appropriate equation, paying attention to units and constraints.
Step 3: Simplify and solve. Work through the algebra step by step, checking each intermediate result.
Step 4: Verify the answer. Check that the solution satisfies the original conditions and makes logical sense.
Common Mistakes to Avoid
- Misidentifying the problem type â Always start by categorizing the problem
- Incorrect formula application â Verify the formula applies to your specific case
- Unit errors â Always check units are consistent throughout
- Sign errors â Pay careful attention to positive and negative values
- Rounding too early â Keep full precision until the final answer
- Forgetting constraints â Check that solutions satisfy all given conditions
Real-World Applications
Understanding this concept is essential for:
- Advanced problem solving in examinations
- Building intuition for more complex topics
- Developing analytical thinking skills
- Applying mathematical reasoning to practical situations
Practice Exercises
- Basic: Solve 5 problems of increasing difficulty using the core concept.
- Intermediate: Apply the concept to word problems with multiple steps.
- Advanced: Combine this concept with 2-3 other topics in a comprehensive problem.
- Challenge: Create your own problem that requires this concept plus additional knowledge.
Interview and Exam Tips
- Common question patterns: Identify which exam or interview formats test this topic
- Time management: Practice completing problems within time constraints
- Common traps: Know the typical mistakes examiners set as distractors
- Verification strategy: Develop a quick method to check your answer
Related Topics
- Previous Topic â Build on the foundation laid here
- Next Topic â See how this concept extends to more advanced material
- Practice Problems â Additional exercises with solutions
- Video Explanation â Visual walkthrough of key concepts
Quick Reference Card
| Concept | Formula/Rule | Key Insight | Common Use |
|---|---|---|---|
| Core Definition | See main text | Understand the intuition | Foundation for all applications |
| Key Formula | See main text | Memorize the derivation | Direct problem solving |
| Special Case | See main text | Recognize when it applies | Simplifies complex problems |
| Edge Case | See main text | Know the limitations | Avoids errors |
Further Reading
For students who want to go deeper:
- Standard textbooks on the subject
- Research papers applying this concept
- Online courses with video explanations
- Practice problem collections with detailed solutions