---
# build_attributes.py input for FPC-Body.tem3p

# TEMP3P Thermal Nonlinear Analysis
- action: edit
  type: analysis
  items:
    - name: 'Analysis'
      value: TEM3P
      items:
        - name: TEM3P
          value: Thermal/Elastic
          items:
            - name: Thermal/Elastic
              items:
              - name: 'Thermal'
                enable: true
                value: Nonlinear

# NERSC Directory
- action: edit
  type: InputData
  items:
    - name: Source
      enable: true
      items:
        - 'NERSCDirectory': /global/cscratch1/sd/johnt/test1/JOBID/s3p_results

# Analysis
- action: edit
  type: ThermalOrder
  items:
    - 'BasisOrder': 2

- action: edit
  type: ThermalLinearSolver
  items:
    - 'Type': GMRES
    - 'Preconditioner': ILU
    - 'AbsoluteTolerance': 1.0e-18
    - 'Tolerance': 1.0e-10
    - 'MaxIterations': 100000

- action: edit
  type: NonlinearSolver
  items:
    - 'Type': Newton
    - 'PicardIteration': 100
    - 'MaxIterations': 500
    - 'AbsTolerance': 2.33e-10
    - 'RelTolerance': 1.0e-8

- action: edit
  type: PicardSolver
  items:
    - 'Solver': CG
    - 'Preconditioner': DIAGONAL
    - 'AbsoluteTolerance': 1.0e-18
    - 'Tolerance': 1.0e-10
    - 'MaxIterations': 100000

# Materials
- type: TEM3PThermalMaterial
  name: Nb
  associate:
    - volume: 1
  items:
    - name: NonlinearMaterial
      value: CustomNonlinear
      children:
        - 'NonlinearThermalConductivity': Temporary/cw16/files/HighRRRNb

- type: TEM3PThermalMaterial
  name: NBti
  associate:
    - volume: 2
  items:
    - 'NonlinearMaterial': NbTi

- type: TEM3PThermalMaterial
  name: ss
  associate:
    - volume: 3
  items:
    - 'NonlinearMaterial': SS316

- type: TEM3PThermalMaterial
  name: cu
  associate:
    - volume: 4
  items:
    - 'NonlinearMaterial': CURRR100
#
- type: TEM3PThermalMaterial
  name: window
  associate:
    - volume: 5
  items:
    - name: NonlinearMaterial
      value: CustomNonlinear
      children:
        - 'NonlinearThermalConductivity': Temporary/cw16/files/al300

# Shells
- type: ThermalShell
  name: shell6
  associate:
    - face: 6
  items:
    - 'BasisOrder': 1
    - 'Thickness': 1.0e-5
    - 'GeneralThermalConductivity': CURRR100

- type: ThermalShell
  name: shell7
  associate:
    - face: 7
  items:
    - 'BasisOrder': 1
    - 'Thickness': 1.0e-4
    - 'GeneralThermalConductivity': CURRR100

# Heat Source
- type: LossyDielectricHeat
  name: heatsource
  associate:
    - volume: 5
  items:
    - name: ConditionType
      value: RFHeating
      children:
        - 'DielectricConstantE': 9.0
        - 'LossTangentE': 0.0001
        - 'WhichMode': 0
        - name: Method
          value: Powerinput
          children:
            - 'TargetPowerinput': 437.5

# Thermal BC
- type: TEM3PThermalNeumann
  associate:
    - face: [1, 10, 11]
#
- type: TEM3PThermalDirichlet
  name: 2k
  associate:
    - face: 2
  items:
    - 'DirichletValue': 2.0

- type: TEM3PThermalDirichlet
  name: 4k
  associate:
    - face: 3
  items:
    - 'DirichletValue': 4.0

- type: TEM3PThermalDirichlet
  name: 70k
  associate:
    - face: 4
  items:
    - 'DirichletValue': 70.0

- type: TEM3PThermalDirichlet
  name: 300k
  associate:
    - face: 5
  items:
    - 'DirichletValue': 300.0

- type: TEM3PThermalRFHeating
  associate:
    - face: [6, 7, 8]
  items:
    - WhichMode: 0
    - name: Method
      value: Powerinput
      children:
        - 'TargetPowerinput': 437.5
    - name: SurfaceResistance
      value: Custom
      children:
        - 'SurfaceResistanceFile': Temporary/cw16/files/SRinnerCU

- type: TEM3PThermalRFHeating
  associate:
    - face: 9
  items:
    - WhichMode: 0
    - name: Method
      value: Powerinput
      children:
        - 'TargetPowerinput': 437.5
    - name: SurfaceResistance
      value: SRinnerNbTi
#
