I wanted to share on the forums a simple way to do scanning simulations (kinda like COMSOL parameter sweeps). I have two reasons for doing that:

- People have been helping me, so I wanted to "balance the karma" sharing a solution for a problem which I hope will help someone else.
- There are other threads on this, and also documentation covers the topic. However, solution in threads is not clearly stated and documentation on this topic is not very detailed. For a newbie like me it is not the best situation.

Let's assume we have an acoustic simulation we solve with the Helmholtz solver. We define the frequency vector containing all the frequencies we want to test in the Header of the sif (Model > Setup > Header > Free Text):

Code: Select all

```
$ f = 500 1000 2200
```

Then, when we edit the Helmholtz equation, we write this into Angular Frequency:

Code: Select all

```
Variable time; Real MATC "2 * pi * f(tx - 1)"
```

Code: Select all

```
Boundary Condition 2
Target Boundaries(1) = 10
Name = "Radiator"
Wave Flux 1 = 0
Wave Flux 2 = Variable time;Real MATC "2 * pi * f(tx - 1) * 1.205 * v"
End
```

If you have any solver saving data for you, just set Exec Solver to After Timestep (Equation > Your-Saver-Equation > Edit Solver Settings > General). Here how my Save-My-Stuff setup looks like:

Code: Select all

```
Equation 2
Name = "Result Output EQ"
Active Solvers(1) = 3
End
Solver 3
Equation = Result Output
Save Geometry Ids = True
Output Format = Vtu
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Save Linear Elements = True
Output File Name = case
Exec Solver = After Timestep
End
```

Hope this helps somebody.

Related threads:

viewtopic.php?f=3&t=4239

viewtopic.php?f=3&t=3392

Related documentation:

http://www.nic.funet.fi/pub/sci/physics ... Manual.pdf

http://www.nic.funet.fi/pub/sci/physics ... ection.2.3

P.S.

Ehm... look at this equation:

Code: Select all

```
Real MATC "2 * pi * f(tx - 1) * 1.205 * v"
```