Skip to content

Introduction to simulations

Projects in Quanscient Allsolve can have more than one simulation. Simulations have a variety of features, options and parameters to choose from. Simulations can be created and modified in the Simulations section:

Simulations section

A new, blank simulation without any selected options can be created by clicking + next to Simulations:

Creating a new simulation

You can also create a new simulation by copying an existing one:

Copying an existing simulation

Copying comes in handy when you wish to create multiple simulations with similar options. When copying, all settings are also copied from the original simulation.

Analysis types

In Quanscient Allsolve, there are five different analysis types available in simulations:

  • Steady state
    • Time-independent systems
  • Harmonic
    • Sinusoidal input
    • For linear problems
  • Multiharmonic
    • Input is a combination of multiple sinusoidal frequencies
    • For nonlinear problems
  • Transient
    • Time-dependent systems
    • Time-stepping
  • Eigenmode
    • Determine the natural frequencies and associated mode shapes of a system

Choosing analysis type

Choosing the right analysis type depends on the nature of the problem at hand. Check the compatibility of analysis types and physics in the table below:

Steady stateHarmonicMultiharmonicTransientEigenmode
Solid Mechanics☑️☑️☑️☑️☑️
Current flow☑️☑️☑️☑️
Acoustic wavesNA☑️☑️☑️☑️
Electrostatics☑️☑️☑️☑️
Electromagnetic wavesNA☑️*☑️
Magnetism A☑️☑️☑️☑️
Magnetism φ☑️☑️☑️☑️
Magnetism H☑️☑️☑️☑️
Laminar flow☑️☑️☑️☑️
Heat solid☑️☑️☑️☑️
Heat fluid☑️☑️☑️☑️
Elastic wavesNA☑️☑️☑️
Mesh deformation☑️☑️☑️☑️

* Compatible, except for ports and S-parameters

NA = Not Applicable

To select an analysis type for your simulation:

  1. Click Analysis type in simulation settings.

  2. Select analysis type in the drop-down list:

    Analysis types drop-down list

Below, we’ll delve deeper into each analysis type.

Steady state

Steady state analysis studies systems where the field variables do not change over time. The partial time derivative term ()/t\partial(\cdot)/\partial t in the partial differential equation is assumed zero. You can think of it like a snapshot of a system after all the initial fluctuations have settled.

Steady state analysis is ideal for problems where the system is stable and the goal is to determine a final equilibrium state.

Harmonic

Harmonic analysis studies systems that respond to a sinusoidal input (e.g., a force or vibration) with a sinusoidal output.

Harmonic analysis is suitable for analyzing systems that experience simple periodic vibrations or oscillations. It helps determine the system’s response at different frequencies. Hence, harmonic simulations are often used with frequency sweeps.

Multiharmonic

Multiharmonic analysis is an extension of harmonic analysis, and it considers systems where the input is not a single sinusoid but a combination of multiple frequencies.

Multiharmonic analysis is useful when dealing with complex systems that are excited by multiple frequencies simultaneously.

Transient

Transient analysis examines how a system evolves over time in response to changing conditions. It calculates the system’s response at various time steps.

Transient analysis is essential for problems where the system’s behavior changes dynamically with time.

Eigenmode

Eigenmode analysis is used to determine the natural frequencies (eigenfrequencies) and associated mode shapes (eigenmodes) of a system. These are the frequencies and modes at which the system tends to vibrate or oscillate naturally when subjected to an initial disturbance with no other external driving force.

Eigenmode analysis is important for understanding the dynamic characteristics of structures, determining potential resonance risks, and designing systems to avoid excessive vibrations or deformations.

Enabled physics

The Enabled physics drop-down list is in simulation options right below Analysis type:

Enabled physics menu

It includes a list of the physics that were added in the project’s Physics section. By default, all physics are ticked as enabled. If you want to disable certain physics in a simulation, untick those physics from the list.

Solver settings

Solver settings contain the solver mode options:

Solver settings

There are two solver mode options:

  • Direct solver
    • Uses a regular parallelization scheme to solve the linear system.
  • Iterative solver
    • Uses DDM to split the mesh into parts, which are then solved in parallel.

Below, we’ll look at the specifics of both solver modes, and how to choose between them.

Direct solver

The direct solver solves the linear system of equations directly using standard matrix decomposition techniques. It leverages regular parallelization schemes to distribute the computational load across multiple CPUs or nodes.

Strengths:

  • Generally more robust and reliable, especially for smaller to medium-sized problems.
  • Typically provides a precise solution without requiring many iterations.

Limitations:

  • Can be computationally expensive and memory-intensive for large problems, as it requires storing and manipulating the entire linear system matrix.
    • Scalability can be limited for extremely large models due to memory constraints.

Iterative solver

The iterative solver utilizes a DDM (Domain Decomposition Method), where the mesh is split into smaller subdomains, which are solved independently and in parallel. The iterative solver then coordinates the solution between adjacent subdomains, and continues iterating until the relative residual tolerance is subceeded. Relative residual tolerance corresponds to the DDM convergence and not the solution convergence.

Strengths:

  • DDM enables efficient parallelization, as each subdomain can be processed on a separate CPU or node.
  • More memory-efficient for large problems, as it only needs to store and manipulate smaller subdomain matrices.
  • Often scales better for very large models due to the distributed nature of DDM.

Limitations:

  • Convergence can be slower than with the direct solver, especially for ill-conditioned problems.
  • Requires careful selection of solver parameters for optimal performance.

Which one to choose?

The choice between direct and iterative solvers depends on the specific simulation:

  • Smaller to medium-sized problems: The direct solver is often a good starting point due to its robustness and relative ease of use.
  • Large-scale problems: The iterative solver with DDM can be more advantageous due to its memory efficiency and scalability.
  • Complex geometries or highly coupled physics: For well-conditioned problems, the iterative solver is better suited to solve complex systems. The iterative solver is not suitable for ill-conditioned problems, however.
  • Time constraints: If a quick solution is needed, a direct solver might be faster, especially if the problem size is manageable.

If you’re unsure, Allsolve has default settings that can provide a reasonable starting point. You can then experiment and compare the performance of both solvers to find the best fit for your specific simulation needs.

Mesh

Projects in Allsolve can have multiple meshes, but for now, simulations can only be run on one mesh at a time.

To choose the mesh for your simulation, click > next to Mesh:

Mesh menu

For more details, see Meshing.

Script

In Quanscient Allsolve, all user-set options in the GUI generate python script files automatically, which can be viewed in the script view. The files are grouped in script view as follows:

  • Autogenerated scripts: These scripts cannot be edited directly, but can be modified by changing settings in the GUI.
  • Your scripts: Can be modified directly by enabling Scripting mode.
  • Extra input files: Any additional input files for simulations.

To open script view, click > next to Script:

Script view

All regions, shared expressions and materials that are defined in the GUI are generated as Autogenerated scripts.

The base simulation script is autogenerated in simulation.py based on defined physics and simulation options. simulation.py can be edited for more advanced setups, overriding autogenerated options. To edit scripts in your project, enable Scripting mode.

For more details, see Scripting.

Node type & count

Node type and count are selected in the simulation Runtime settings:

Script view

The node types currently available are:

  • Fast start (3 CPU, 10 GB)
    • For small simulations
    • Eliminates startup delay
    • Node count limited to 1
  • 1 CPU, 16 GB
    • Default node type
  • 2 CPU, 32 GB
  • 4 CPU, 64 GB
  • 8 CPU, 128 GB
  • 16 CPU, 256 GB
  • 32 CPU, 512 GB

Node count is an integer, limited by the parallel cores in your plan. For the smallest plan type, which includes 16 parallel CPUs, a maximum of sixteen 1 CPU, 16 GB nodes or one 16 CPU, 256 GB node can be used simultaneously.

Choosing node type & count

Ideally, you should start with the smallest node count and type. Select more or bigger nodes only if you need them due to memory limitations.

For multinode simulations, a rule of thumb is to have 50-100k DOFs (degrees of freedom) per 16 GBs of memory. So for 1 million DOFs, 10-20 nodes with 1 CPU, 16 GB would hit the sweet spot.

Only a rough estimate is given here, as the required memory varies a lot depending on the problem at hand. The direct solver uses more memory than the iterative solver, so for the same problem some more nodes are required by comparison.

For eigenmode analysis, it’s best to use several 1 CPU, 16 GB nodes with the direct solver. The eigenmode solver is in itself an iterative solver, so using the iterative solver with eigenmode would make for many iterations.