# Heat Equation Solver
The Heat Equation Solver is used for configuring the numerical solver settings for conjugate heat transfer simulations. It controls how the heat equation is solved within solid regions.
# 📋 Available Options
Option | Description | Unit |
---|---|---|
absolute_tolerance | Absolute residual tolerance for heat equation convergence | |
equation_evaluation_frequency | Frequency at which to solve the heat equation | |
order_of_accuracy | Order of accuracy in space (fixed at 2) | |
linear_solver | Settings for the linear solver |
# 🔍 Detailed Descriptions
# absolute_tolerance
Absolute residual tolerance that determines the convergence of the heat equation in conjugate heat transfer.
- Default:
1e-9
- Example:
1e-10
- Notes: This value should be the same or higher than the absolute tolerance for the linear solver by a small margin.
# equation_evaluation_frequency
Frequency at which to solve the heat equation in conjugate heat transfer simulations.
- Default:
10
- Example:
2
- Notes: Lower values mean more frequent updates but higher computational cost.
# order_of_accuracy
Order of accuracy in space for the heat equation solver.
- Default:
2
- Example:
2
- Notes: This value is fixed at 2 and cannot be changed.
# linear_solver
Configuration for the linear solver used to solve the heat equation.
- Default:
LinearSolver(max_iterations=50, absolute_tolerance=1e-10)
- Example: See Python example below
- Notes: Controls the inner linear solver iterations and convergence criteria.
💡 Tips
- Set
absolute_tolerance
slightly higher than the linear solver's tolerance - Adjust
equation_evaluation_frequency
based on the coupling strength between fluid and solid regions - For steady simulations, higher evaluation frequencies can help with convergence
- For unsteady simulations, lower frequencies might be needed to capture transient effects
❓ Frequently Asked Questions
How do I choose the right equation evaluation frequency?
Start with the default value of 10. If the solution is not converging well, try decreasing it. For steady simulations with weak coupling, you can increase it to reduce computational cost.
Why can't I change the order of accuracy?
The heat equation solver uses a fixed second-order accurate spatial discretization to ensure good accuracy while maintaining stability.
How should I set the absolute tolerance?
Set it slightly higher than the linear solver's absolute tolerance to ensure proper convergence hierarchy. For example, if linear solver tolerance is 1e-10, use 1e-9 for the heat equation solver.
🐍 Python Example Usage
Below is a Python code example showing how to configure the Heat Equation Solver:
heat_solver = fl.HeatEquationSolver(
equation_evaluation_frequency=2,
absolute_tolerance=1e-9,
linear_solver=fl.LinearSolver(
max_iterations=50,
absolute_tolerance=1e-10
),
relative_tolerance=0.001
)
# Use it in a Solid model
solid_model = fl.Solid(
entities=[volume_mesh["solid-*"]],
heat_equation_solver=heat_solver,
material=fl.SolidMaterial(...),
initial_condition=fl.HeatEquationInitialCondition(temperature="1.0")
)