SourceBag

Type:section
Appearance:simple

Impressed physical quantities like the temperature or the electric field strength are called “Sources”. They are considered as input fields of the simulation. Together with the geometry layout, the material properties and the boundary conditions the sources define the actual simulation project. SourceBags are defined in the file sources.jcm.

Example: A source bag containing an electromagnetic plane wave as source field may be specified as follows:

SourceBag {
  Source {
    ElectricFieldStrength {
      PlaneWave {
        K = [0 0 -26632577.18]
        Amplitude = [ 0 1 0]
      }
    }
  }
}

To put it into mathematical terms, sources are considered as the “right hand side” f of a partial differential equation with operator \mathcal{L}:

\begin{eqnarray*}
   \mathcal{L} (u)    & = & f,
\end{eqnarray*}

where u denotes the solution fields. This is a simplified view on the topic since source fields may affect the operator \mathcal{L} as well - think of a permittivity tensor field which may depend on the temperature or on the stress distribution. However, for the moment it will be sufficient to regard the source fields as right hand sides of the equations modeling the physics.

Often, one wants to solve the same problem but for different sources f_1, f_2, \dots, f_n yielding independent solutions u_1, u_2,\dots, u_n. It will save computational costs when doing this with just one call of JCMsolve.

To account for this, multiple right hand sides can be simultaneously defined within one sources.jcm file: Several SourceBag sections can be defined, each containing one or more sources. Each SourceBag contributes to one right hand side. Hence the file sources.jcm has the following structure:

# gather all sources for rhs 1
SourceBag {
  Source { ...
  }
  Source { ...
  }
  ...
}
# gather all sources for rhs 2
SourceBag {
  Source { ...
  }
  Source { ...
  }
  ...
}
...

Here, an individual source definition is done by a Source section which may contain field definitions within domains or on boundaries. Within each SourceBag the contained sources are summed up to form a right hand side.

Note

Omitting the SourceBag section is treated as the single right hand side case.

Warning

It depends on the actual simulation problem how the defined sources are interpreted. Please consult the problem specifications.