dgtd

Maxwell's curl equations solver using discontinuous Galerkin methods.

https://github.com/opensemba/dgtd

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.8%) to scientific vocabulary

Keywords

cem dgtd fem
Last synced: 6 months ago · JSON representation ·

Repository

Maxwell's curl equations solver using discontinuous Galerkin methods.

Basic Info
  • Host: GitHub
  • Owner: OpenSEMBA
  • License: bsd-3-clause
  • Language: C++
  • Default Branch: main
  • Homepage:
  • Size: 45 MB
Statistics
  • Stars: 24
  • Watchers: 5
  • Forks: 3
  • Open Issues: 13
  • Releases: 0
Topics
cem dgtd fem
Created over 3 years ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

ubuntu-gnu windows-msvc

semba-dgtd

Maxwell's curl equations solver using discontinuous Galerkin methods

Compiling

Compilation needs vcpkg with the following packages: - eigen3 - gtest - metis (for MPI) - hypre (for MPI)

OpenMP and MPI in Windows

  • OpenMP requires an LLVM compiler. It has been tested Intel OneAPI (Base kit and HPC kit). To compile, use the following CMake Command Arguments when compiling MFEM and maxwell dgtd: -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icx
  • MPI requires mfem to be compiled with MFEMUSEMPI which requires Hypre and METIS.
    • Option 1, install with vcpkg. make sure to mark METISVERSION5 and that th
    • Option 2, compiling from sources: Hypre can be cloned from https://github.com/hypre-space/hypre. It must be compiled and installed using a CMakeLists.txt in hypre/src. It is possible that the following variable has to be manually set: HYPRE_LIBRARIES=[PATH TO lib]\HYPRE.lib METIS 5.0.1 can be compiled in Windows with CMake. For VS2022+, comment out the line #define rint(x) ((idx_t)((x)+0.5)) in metis\GKlib\gk_arch.h

OpenMP and MPI Linux

  • Tested to compile with gcc.
  • OpenMP has been tested to work.

Defining a JSON file

Cases can be defined by parsing a JSON file with the problem information. See a complete example of a valid JSON file. An OpenSemba/dgtd JSON file must have the following structure, bold entries are required:

  • solver_options:
    • Object. User can customise some of the simulation options in this section. If undefined, the problem will use the default settings.
      • solver_type:
        • String. Defines the evolution operator that will be used in the simulation. Can be "Centered" or "Upwind". If undefined, defaults to "Upwind".
      • final_time:
        • Double. In Natural Units (1 meter/c), how long the problem will be simulated. If undefined, defaults to 2.0.
      • time_step:
        • Double. In Natural Units (1 meter/c), defines the time step increments between iterations. Must be defined in 2D and/or 3D. Overrides CFL for 1D if both are defined. If undefined or set to 0.0 in 1D, will use an automatic time step calculation approach through CFL's condition.
      • cfl:
        • Double. Courant–Friedrichs–Lewy condition, defines time step increments between iterations for 1D. Not available for 2D and/or 3D. If 'time_step' is defined this parameter is ignored. Defined between 0.0 and 1.0.
      • order:
        • Integer. Polynomial order of the interpolation function used in the Finite Element Collection. If undefined, defaults to 3.
      • spectral:
        • Boolean. Use an Evolution Operator that uses a complete matrix form for all E and H unknowns but allows to calculate an approximate time step through analysis of the Eigenvalues of the matrix. Heavy computational cost, slower than the default Evolution Operators. Does not support the latest features. If undefined, defaults to false.

Example of a complete solveroptions section:
https://github.com/OpenSEMBA/dgtd/blob/5dd67ef6435066172e9387d674ea7ccc4c6a8b87/testData/maxwellInputs/1D
PECCentered/1DPEC_Centered.json#L2-L8

  • Model:
    • Object. Contains geometrical information on the problem. User can define materials and boundaries in this section.
      • filename:
        • String. Name of the mesh file with the geometrical information for the problem. Must have the same name as the case folder.
      • materials:
        • Array of materials. Contains the physical information of the material domains defined in the problem. At least one material must exist in the problem and be defined. Each material is composed of the following parameters:
          • tags:
          • class:
          • relative_permittivity:
          • relative_permeability:
      • boundaries:
        • Array of boundaries. Contains the physical information of the material interfaces or boundary faces defined in the problem. At least one boundary must exist in the problem and be defined. Each boundary is composed of the following parameters:
          • tags:
          • class:

Example of a model section with two defined materials each with a different tag, Vacuum and a Dielectric with a specified permittivity; the model also has a boundary defined by two geometrical tags that share the same boundary type. The mesh and the folder for the case share the same name, with the exception of the mesh's file format: https://github.com/OpenSEMBA/dgtd/blob/5dd67ef6435066172e9387d674ea7ccc4c6a8b87/testData/maxwellInputs/1DPECCentered/1DPECCentered.json#L11-L30

  • Probes:
    • Object. User can customise data extraction in this section. If undefined, no data extraction will be performed.
      • exporter:
        • Object. If defined, enables Paraview data exporting for posterior visualization.
          • steps:
      • field:
        • Array. If defined, stores all fields at the specified point every time step.
          • position:
      • surfaces:
        • Array. To be implemented. If defined, data will be extracted on the specified interfaces or boundary faces of the problem.
          • field:
          • tags:

Example of a probes section with all types of probes defined. An exporter probe that saves data at every step, a fields probe that stores all fields at position 0.0 for a 1D Mesh, and a surface probe that will store the "E" field at the surface with geometrical tag "1": https://github.com/OpenSEMBA/dgtd/blob/2e153b3978c770c8fc5ef299de6bf6b51fd98ef0/testData/maxwellInputs/1DPECCentered/1DPECCentered.json#L32-L47

  • Sources:
    • Array of sources. User can customise problem illumination in this section. User should define at least one type of illumination from the available types. Different illumination types have different required parameters.
      • type:
        • String. Can be "initial" or "totalField".
      • tags:
        • Array of integers. Geometrical tags for interfaces or boundary faces which define a totalField region. Only required if type: "totalField".
      • field_type:
        • String. Only required if type: "initial". Can be "E" or "H".
      • center:
        • Array of doubles. Center at with the illumination will be placed at the starting time. Only required if magnitude: "gaussian". Array must be n-Dimensional and define the required X, Y and/or Z coordinates. i.e. A 2D mesh only requires to define X and Y coordinates. If undefined, defaults to zero for each component.
      • polarization:
        • Array of doubles. Direction of the field_type's polarization. Array must be 3D, all X, Y and Z vector magnitudes must be defined.
      • dimension:
        • Integer. Which parameters to use in the (x+y+z)2 term of the gaussian expression. Only required if magnitude: "gaussian".
      • propagation:
        • Array of doubles. Array must be 3D, all X, Y and Z vector magnitudes must be defined. Only required if type: "totalField".
      • magnitude:
        • Object. Defines paremeters relevant to the mathematical expression of the illumination. Not all parameters are required for specific magnitude types.
          • type:
          • spread:
          • delay:
          • modes:

Example of a sources section with all available types of sources defined for documentation purposes. For most cases, a single source is enough: - An initial gaussian source defined on Ey at x = 0.5 (1D problem), the wave that will appear will be of type "gaussian" with the defined delay and spread. - An initial resonant source on Ey with 2 standing waves along the X axis (1D Problem). - A totalField source defined on interfaces or boundary faces 1, 2, 3 and 4, polarised on the direction Y for the "E" field and with a propagation vector in the direction X, the wave that will appear will be of type "gaussian" with the defined delay and spread.

https://github.com/OpenSEMBA/dgtd/blob/5dd67ef6435066172e9387d674ea7ccc4c6a8b87/testData/maxwellInputs/1DPECCentered/1DPECCentered.json#L50-L83

Funding

  • Spanish Ministry of Science and Innovation (MICIN/AEI) (Grant Number: PID2022-137495OB-C31).
  • European Union, HECATE project (HE-HORIZON-JU-Clean-Aviation-2022-01).
  • European Union, FEDER 2020 (B-TIC-700-UGR20).

Owner

  • Name: OpenSEMBA
  • Login: OpenSEMBA
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: García
    given-names: Salvador G.
    orcid: https://orcid.org/0000-0001-7317-1423
  - family-names: Angulo
    given-names: Luis D.
    orcid: https://orcid.org/0000-0002-1690-7892
  - family-names: Muñoz
    given-names: Alejandro 
    orcid: https://orcid.org/0000-0002-2406-8128
  - family-names: Gascón
    given-names: Alberto 
    orcid: https://orcid.org/0000-0003-1190-2248
  - family-names: Mazariegos
    given-names: Farah Amador 
    orcid: https://orcid.org/0009-0009-4591-9313
url: "https://github.com/opensemba/dgtd"
title: "semba-dgtd"
date-released: 2024-01-01

GitHub Events

Total
  • Issues event: 1
  • Watch event: 9
  • Delete event: 1
  • Push event: 241
  • Pull request event: 35
  • Pull request review event: 31
  • Pull request review comment event: 18
  • Fork event: 2
  • Create event: 5
Last Year
  • Issues event: 1
  • Watch event: 9
  • Delete event: 1
  • Push event: 241
  • Pull request event: 35
  • Pull request review event: 31
  • Pull request review comment event: 18
  • Fork event: 2
  • Create event: 5

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 13
  • Average time to close issues: N/A
  • Average time to close pull requests: 7 days
  • Total issue authors: 0
  • Total pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 13
  • Average time to close issues: N/A
  • Average time to close pull requests: 7 days
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • AlejandroMunozManterola (1)
  • 70905259 (1)
Pull Request Authors
  • AlejandroMunozManterola (20)
  • lmdiazangulo (2)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels
enhancement (1)