### SaveScalars in parallel

Posted:

**17 Apr 2024, 13:26**Hello,

I'm performing a simulation of the flow passed an airfoil by using ElmerGUI. One of the objectives is to calculate the lift and drag forces. To do so, I'm using the "Calculate Loads" in the Navier-Stokes solver and summing them over the airfoil using the SaveScalars solver. The .sif code parts are hereafter detailed:

The Navier-Stokes part:
The SaveScalars solver:
The airfoil boundary condition:
Nevertheless, when I execute the simulation in parallel I get a strange error, which does not appear if the simulation is ran in sequential. Additionally, I submit the entire .sif and the error output.

Thanks for the help.

I'm performing a simulation of the flow passed an airfoil by using ElmerGUI. One of the objectives is to calculate the lift and drag forces. To do so, I'm using the "Calculate Loads" in the Navier-Stokes solver and summing them over the airfoil using the SaveScalars solver. The .sif code parts are hereafter detailed:

The Navier-Stokes part:

Code: Select all

```
Solver 2
Equation = Navier-Stokes
Calculate Loads = True
Procedure = "FlowSolve" "FlowSolver"
Variable = Flow Solution[Velocity:2 Pressure:1]
Exec Solver = Always
Stabilize = True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-4
Nonlinear System Max Iterations = 10
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 0.5
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 1000000
Linear System Convergence Tolerance = 1.0e-6
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End
```

Code: Select all

```
Solver 1
Equation = SaveScalars
Procedure = "SaveData" "SaveScalars"
Variable 1 = Flow Solution Loads 1
Parallel Reduce = True
Operator 1 = boundary sum
File Append = True
Variable 2 = Flow Solution Loads 2
Filename = fluidForces.dat
Exec Solver = Always
End
```

Code: Select all

```
Boundary Condition 3
Target Boundaries(1) = 8
Name = "Airfoil"
Noslip wall BC = True
Save Scalars = True
End
```

Thanks for the help.