Inspect A Resonance Result

This tutorial inspects result data and eigenvalues from a resonance solve.

Run it from demos/documentation_tutorials:

python result_access/02_single_solves/01_resonance/run.py
import jcmsuite

results = jcmsuite.solve("project.jcmp", keys={"radius": 0.5})

# Show the results object and its attributes
print(results)

# Show the path to the fieldbag file
print(results.file)

# Show a preview of the project keys used for solving, when available
print(results.keys)

# Show a preview of the computational costs associated with the solve call
print(results.costs)

# Show a preview of the eigenvalues of the resonance problem, when available
print(results.eigenvalues)

# Show a preview of the postprocesses available in the results
print(results.postprocesses)

# Give a list of the titles of the postprocesses available in the results
print(results.postprocesses.titles())

Project Files

layout.jcm
Layout {
  UnitOfLength = 1e-6
  MeshOptions {
    MaximumSidelength = 0.2
  }
  Parallelogram {
    DomainId = 1
    Width = 2
    Height = 2
    BoundarySegment {
      BoundaryClass = Transparent
    }
  }
  Circle {
    DomainId = 2
    Radius = 0.5
    RefineAll = 2
  }
}
layout.jcmt
Layout {
  UnitOfLength = 1e-6
  MeshOptions {
    MaximumSidelength = 0.2
  }
  Parallelogram {
    DomainId = 1
    Width = 2
    Height = 2
    BoundarySegment {
      BoundaryClass = Transparent
    }
  }
  Circle {
    DomainId = 2
    Radius = %(radius)e
    RefineAll = 2
  }
}
materials.jcm
Material {
  DomainId = 1
  RelPermittivity = 1.0
  RelPermeability = 1.0
}

Material {
  DomainId = 2
  RelPermittivity = 2.3104
  RelPermeability = 1.0
}
project.jcmp
Project {
  InfoLevel = 3
  Electromagnetics {
    TimeHarmonic {
      PropagatingMode {
        Lambda0 = 1.5e-6
        Accuracy {
          Precision = 1e-4
          Refinement {
            MaxNumberSteps = 0
            PreRefinements = 0
          }
        }
        SelectionCriterion {
          NearGuess {
            Guess = 1.5
            NumberEigenvalues = 1
          }
        }
      }
    }
  }
}
sources.jcm
SourceBag {
  Source {
    ElectricFieldStrength {
      PlaneWave {
        K = [1.14239732857811e7 0.0 0.0]
        Amplitude = [0 0 1]
      }
    }
  }
}