# 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
Absolute tolerance Absolute residual tolerance for heat equation convergence
Relative tolerance Relative residual reduction for heat equation convergence
Order of accuracy Order of accuracy in space (fixed at 2)
Equation evaluation frequency Frequency at which to solve the heat equation
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

Note: This value should be the same or higher than the absolute tolerance for the linear solver by a small margin.

# Relative tolerance

Absolute residual tolerance that determines the convergence of the heat equation in conjugate heat transfer.

  • Default: 0 (disabled)
  • Example: 1e-3

Note: If the value drops by that factor, the solver procedes to the next step.

# Order of accuracy

Order of accuracy in space for the heat equation solver.

  • Default: 2
  • Example: 2

Note: This value is fixed at 2 and cannot be changed.

# Equation evaluation frequency

Frequency at which to solve the heat equation in conjugate heat transfer simulations.

  • Default: 10
  • Example: 2

Note: Lower values mean more frequent updates but higher computational cost.

# Linear solver

Configuration for the linear solver used to solve the heat equation.

  • Parameters:
    • Max iterations - 50 by default
    • Absolute tolerance - 1e-10 by default
    • Relative tolerance

Note: 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")
)