---

# For information
valueTypes:
  - scalar # default
  - table
  - expression
  - complex # not used
  - coupled # not used

# For information
styleTypes:
  - checkbox
  - dropdown
  - input #default
  - radio

# For information
valueKinds:
  - boolean #default for checkboxes
  - float #default
  - integer
  - string

@@include('baseUnits.yaml')

@@include('physicalConstants.yaml')

physicalProperties:
  - &propTemperature
    id: 1
    key: temperature
    name: Temperature
    symbol: T
    units: "\\degree C"
    baseUnit: siTemperature
    min: -273.15
    minExclude: false

  - &propTime
    id: 2
    key: time
    name: Time
    symbol: t
    units: s
    baseUnit: siTime

  - &propMagFlux
    id: 3
    key: magflux
    name: Magnetic Flux Density
    symbol: B
    units: T
    baseUnit: siTesla

  - &propMagIntensity
    key: magIntensity
    name: Magnetic field intensity
    symbol: H
    units:  "\\frac{A}{m}"
    baseUnit: siAmperePerMeter

  - &propFrequency
    key: frequency
    name: Frequency
    symbol: f
    @@if(app === 'ANTENNAS') {
    valueKind: integer
    units: MHz
    factor: 1e6
    }
    @@if(app === 'ALL' || app === 'INDUCTION' || app === 'APP') {
    units: Hz
    }
    baseUnit: siHertz
    min: 0
    minExclude: true


@@include('timeTypes.yaml')

@@include('basisTypes.yaml')

singlePhysics:
  @@include('physicsThermal.yaml')
  @@include('physicsElectromagnetics.yaml')
  @@include('physicsMicrowaves.yaml')

  @@if(app === 'ALL' || app === 'ANTENNAS') {
    @@include('physicsMicrowaves.yaml')
  }

  @@if(app === 'ALL' || app === 'API') {
    @@include('physicsFluidDynamics.yaml')
    @@include('physicsRotatingMagnetsEM.yaml')
  }



multiPhysics:
  @@include('physicsInductionHeating.yaml')
  @@if(app === 'ALL' || app === 'API') {
    @@include('physicsMagnetStirring.yaml')
  }

physics:
  @@if(app === 'ALL' || app === 'INDUCTION') {
  - *physicsThermal
  - *physicsElectromagnetics
  - *physicsInductionHeating
  }

  @@if(app === 'ALL' || app === 'ANTENNAS') {
  - *physicsMicrowaves
  }

  @@if(app === 'ALL' || app === 'API') {
  - *physicsFluidDynamics
  - *physicsRotatingMagnetsEM
  - *physicsMagnetStirring
  }

@@if(app === 'ALL') {
defaultPhysicsBlock: ""
}
@@if(app === 'ANTENNAS') {
defaultPhysicsBlock: "physicsMicrowaves"
}
@@if(app === 'INDUCTION') {
defaultPhysicsBlock: "physicsInductionHeating"
}
@@if(app === 'API') {
defaultPhysicsBlock: "physicsMagnetStirring"
}

solverParts:
  @@include('solverGetdpThermal.yaml')

  @@include('solverGetdpEMGeneral2D.yaml')

  @@include('solverGetdpEMGeneral3D.yaml')

  @@if(app === 'ALL' || app === 'ANTENNAS') {
    @@include('solverGetdpMicrowaves.yaml')
  }

  @@if(app === 'ALL' || app === 'API') {
    @@include('solverOpenFOAMFluidDynamics.yaml')
    @@include('solverElmerRotatingMagnets.yaml')
  }

# GetDP Induction Heating 2D and 3D solvers
@@if(app === 'ALL' || app === 'INDUCTION') {
  getdpInductionGeneral2D: &getdpInductionGeneral2D
    command: runGetdp
    isMultiPhysics: true
    subSolvers:
      subPhysicsThermalGeneral: *getdpThermal
      subPhysicsEMGeneral2D: *getdpEMGeneral2D

  getdpInductionGeneral3D: &getdpInductionGeneral3D
    command: runGetdp
    isMultiPhysics: true
    subSolvers:
      subPhysicsThermalGeneral: *getdpThermal
      subPhysicsEMGeneral3D: *getdpEMGeneral3D
}

# EOF MagnetStirring 2D and 3D solvers
@@if(app === 'ALL' || app === 'API') {
  eofMagnetStirringGeneral: &eofMagnetStirringGeneral
    command: runEOF
    isMultiPhysics: true
    subSolvers:
      subPhysicsFluidGeneral: *ofFluidDynamics
      subPhysicsRotatingMagnetsGeneral: *elmerRotatingMagnets
}

solvers:
  physicsThermal:
    subPhysicsThermal:
      mesh2D:
        - *getdpThermal
      mesh3D:
        - *getdpThermal

  physicsElectromagnetics:
    subPhysicsEMGeneral:
      mesh2D:
        - *getdpEMGeneral2D
      mesh3D:
        - *getdpEMGeneral3D

  @@if(app === 'ALL' || app === 'INDUCTION') {
  physicsInductionHeating:
    subPhysicsInductionGeneral:
      mesh2D:
        - *getdpInductionGeneral2D
      mesh3D:
        - *getdpInductionGeneral3D
  }

  @@if(app === 'ALL' || app === 'ANTENNAS') {
  physicsMicrowaves:
    subPhysicsMicrowavesGeneral:
      mesh2D:
        - *getdpMicrowavesGeneral
      mesh3D:
        - *getdpMicrowavesGeneral
  }

  @@if(app === 'ALL' || app === 'API') {
  physicsFluidDynamics:
    subPhysicsFluidDynamics:
      mesh2D:
        - *ofFluidDynamics
      mesh3D:
        - *ofFluidDynamics

  physicsRotatingMagnetsEM:
    subPhysicsRotatingMagnets:
      mesh2D:
        - *elmerRotatingMagnets
      mesh3D:
        - *elmerRotatingMagnets

  physicsMagnetStirring:
    subPhysicsStirring:
      mesh2D:
        - *eofMagnetStirringGeneral
      mesh3D:
        - *eofMagnetStirringGeneral
  }

motion:
  -
    <<: *velocityX
    sendAlways: true
  -
    <<: *velocityY
    sendAlways: true
  -
    <<: *velocityZ
    sendAlways: true
    relevance:
      - key: dimensions
        value: 3
  -
    <<: *angularVelocityZ
    sendAlways: true
    relevance:
      - key: dimensions
        value: 3
