text: # -*- coding: utf-8 -*-
  from ogs5py import OGS
  
  model = OGS(
      task_root='tm1_3Dsquare_root',
      task_id='tm1_3Dsquare',
      output_dir='out',
  )
  model.msh.read_file('tm1_3Dsquare.msh')
  model.gli.read_file('tm1_3Dsquare.gli')
  model.pcs.add_block(
      main_key='PROCESS',
      PCS_TYPE='HEAT_TRANSPORT',
      NUM_TYPE='NEW',
  )
  model.pcs.add_block(
      main_key='PROCESS',
      PCS_TYPE='DEFORMATION',
      NUM_TYPE='NEW',
  )
  model.rfd.read_file('tm1_3Dsquare.rfd')
  model.bc.add_block(
      main_key='BOUNDARY_CONDITION',
      PCS_TYPE='DEFORMATION',
      PRIMARY_VARIABLE='DISPLACEMENT_X1',
      GEO_TYPE=['SURFACE', 'SURFACE1'],
      DIS_TYPE=[
          ['LINEAR', 4],
          [0, 0.0],
          [1, 0.0],
          [2, 0.0],
          [3, 0.0],
      ],
      TIM_TYPE=['CURVE', 1],
  )
  model.bc.add_block(
      main_key='BOUNDARY_CONDITION',
      PCS_TYPE='DEFORMATION',
      PRIMARY_VARIABLE='DISPLACEMENT_Y1',
      GEO_TYPE=['SURFACE', 'SURFACE2'],
      DIS_TYPE=[
          ['LINEAR', 4],
          [4, 0.0],
          [5, 0.0],
          [6, 0.0],
          [7, 0.0],
      ],
      TIM_TYPE=['CURVE', 1],
  )
  model.bc.add_block(
      main_key='BOUNDARY_CONDITION',
      PCS_TYPE='DEFORMATION',
      PRIMARY_VARIABLE='DISPLACEMENT_Z1',
      GEO_TYPE=['SURFACE', 'SURFACE3'],
      DIS_TYPE=[
          ['LINEAR', 4],
          [8, 0.0],
          [9, 0.0],
          [10, 0.0],
          [11, 0.0],
      ],
      TIM_TYPE=['CURVE', 1],
  )
  model.bc.add_block(
      main_key='BOUNDARY_CONDITION',
      PCS_TYPE='HEAT_TRANSPORT',
      PRIMARY_VARIABLE='TEMPERATURE1',
      GEO_TYPE=['SURFACE', 'SURFACE4'],
      DIS_TYPE=[
          ['LINEAR', 4],
          [12, -10.0],
          [13, -10.0],
          [14, -10.0],
          [15, -10.0],
      ],
      TIM_TYPE=['CURVE', 1],
  )
  model.bc.add_block(
      main_key='BOUNDARY_CONDITION',
      PCS_TYPE='HEAT_TRANSPORT',
      PRIMARY_VARIABLE='TEMPERATURE1',
      GEO_TYPE=['SURFACE', 'SURFACE5'],
      DIS_TYPE=[
          ['LINEAR', 4],
          [16, 10.0],
          [17, 10.0],
          [18, 10.0],
          [19, 10.0],
      ],
      TIM_TYPE=['CURVE', 1],
  )
  model.ic.add_block(
      main_key='INITIAL_CONDITION',
      PCS_TYPE='HEAT_TRANSPORT',
      PRIMARY_VARIABLE='TEMPERATURE1',
      GEO_TYPE='DOMAIN',
      DIS_TYPE=['CONSTANT', 1e-10],
  )
  model.mmp.add_block(
      main_key='MEDIUM_PROPERTIES',
      GEOMETRY_DIMENSION=3,
  )
  model.msp.add_block(
      main_key='SOLID_PROPERTIES',
      DENSITY=[1, 0.0],
      THERMAL=[
          ['EXPANSION', 0.001],
          ['CAPACITY'],
          [1, 0.0],
          ['CONDUCTIVITY'],
          [1, 1.0],
      ],
      ELASTICITY=[
          ['POISSION', 0.2],
          ['YOUNGS_MODULUS'],
          [1, 10000000000.0],
      ],
  )
  model.mfp.add_block(
      main_key='FLUID_PROPERTIES',
      FLUID_TYPE='LIQUID',
      PCS_TYPE='PRESSURE1',
      DENSITY=[1, 0.0],
      VISCOSITY=[1, 0.001],
  )
  model.num.add_block(
      main_key='NUMERICS',
      PCS_TYPE='HEAT_TRANSPORT',
      LINEAR_SOLVER=[2, 1, 1e-10, 10000, 1.0, 101, 4],
  )
  model.num.add_block(
      main_key='NUMERICS',
      PCS_TYPE='DEFORMATION',
      LINEAR_SOLVER=[2, 1, 1e-10, 10000, 1.0, 101, 4],
  )
  model.tim.add_block(
      main_key='TIME_STEPPING',
      PCS_TYPE='HEAT_TRANSPORT',
      TIME_UNIT='SECOND',
      TIME_STEPS=[2, 1.0],
      TIME_END=1.0,
      TIME_START=0.0,
  )
  model.tim.add_block(
      main_key='TIME_STEPPING',
      PCS_TYPE='DEFORMATION',
      TIME_UNIT='SECOND',
      TIME_STEPS=[2, 1.0],
      TIME_END=1.0,
      TIME_START=0.0,
  )
  model.out.add_block(
      main_key='OUTPUT',
      NOD_VALUES=[
          ['TEMPERATURE1'],
          ['DISPLACEMENT_X1'],
          ['DISPLACEMENT_Y1'],
          ['DISPLACEMENT_Z1'],
          ['STRESS_XX'],
          ['STRESS_XY'],
          ['STRESS_YY'],
          ['STRESS_ZZ'],
          ['STRESS_XZ'],
          ['STRESS_YZ'],
          ['STRAIN_XX'],
          ['STRAIN_XY'],
          ['STRAIN_YY'],
          ['STRAIN_ZZ'],
          ['STRAIN_XZ'],
          ['STRAIN_YZ'],
      ],
      GEO_TYPE='DOMAIN',
      DAT_TYPE='TECPLOT',
      TIM_TYPE=1,
  )
  model.write_input()
  model.run_model()
  