Kitchen sink

Kitchen sink#

Here a full example of the configuration file is provided, with its fields and capabilities.

dependencies:
  # sim_cfg_files: ["path/to/dependent/simulation_config.yaml"]
  sim_cfg_files: []

variables:
  version: ${NASSU_VERSION} # x.y.z
  filepath: ${NASSU_FILE_PATH} # docs/source/user_guide/02_config/file/kitchensink.nassu.yaml
  foldername: ${NASSU_FILE_FOLDER} # docs/source/user_guide/02_config/file

  n_steps_var: !math &ANCHOR_N_STEPS_VAR 25*2000
  base_folder: "examples/study_cases/high_rise_building"
  domain_size: 96
  height_ref: 8
  cfg_time:
    develop_steps: 5000
    cst_step: !math ${height_ref}/${u_ref[1]}
    cst_run: 100
    total_steps:
      !math ${cfg_time.develop_steps} + ${cfg_time.cst_step} * ${cfg_time.cst_run}
  u_ref: !math [0.05, 0.05*1.1]
  angle_use: !math cos(pi*45/180)
  nested_angle: !math cos(acos(pi/4))
  min_max: !math min(cos(acos(pi/4)), acos(pi/4))

  my_report: &ANCHOR_REPORT
    start_step: 0
    end_step: 0
    frequency: 1000

  macrs_rescale: &MACRS_RESCALE
    rho:
      mul: 1e3
      cte: 100
    ux:
      mul: 100
      cte: 0
    uy:
      mul: 100
      cte: 0
    uz:
      mul: 100
      cte: 0

simulations:
  - name: highRiseBuildingZero
    run_simul: true
    n_steps: *ANCHOR_N_STEPS_VAR
    save_path: !sub "${base_folder}/resuts/high_rise_building"
    report: *ANCHOR_REPORT

    domain:
      domain_size:
        x: !unroll [!math "${domain_size}", !math "${domain_size}*2"]
        y: !unroll [!math "${domain_size}", !math "${domain_size}*2"]
        z: !unroll [!math "${domain_size}", !math "${domain_size}*2"]
      domain_rescale:
        translation: [0, -10, 20]
        scale: [1, 1, 0.5]
      block_size: 8
      refinement:
        static:
          volumes_body_refine:
            volumes_refine:
              - is_abs: true
                lvl: 1
                start: [0.0, 0.0, 0.0]
                end: !math [32.0, 160.0, "${domain_size}/2"]
            bodies:
              - body_name: CAARC
                lvl: 4
                normal_offsets: [0]
                transformation:
                  translation: [12.0, 0.0, 1.0]
          limit_volume:
            bodies:
              - body_name: CAARC
                lvl: 6
                normal_offsets: [0]
            volume_refinement_limit:
              is_abs: true
              start: [0, 10, 0]
              end: [40, 50, 150]
          ignore_volumes:
            bodies:
              - body_name: CAARC
                lvl: 6
                # Generates from -0.5 to 4.9, doesn't include 5
                normal_offsets: !range [-0.5, 5, 0.2]
              - { body_name: CAARC.surface_name, lvl: 4, normal_offsets: !math [1/4] }
            volumes_not_refine:
              - is_abs: true
                start: [0, 10, 0]
                end: [40, 50, 150]
              - is_abs: false
                start: [0, 0.15, 0.1]
                end: [0.1, 0.2, 0.3]
          full_example:
            volumes_refine:
              - is_abs: true
                lvl: 1
                start: [0.0, 0.0, 0.0]
                end: [32.0, 160.0, 64.0]
              - is_abs: true
                lvl: 4
                start: [10, 20, 30]
                end: [32.0, 160.0, 64.0]
            bodies:
              - body_name: CAARC
                lvl: 6
                normal_offsets: [0]
            volume_refinement_limit:
              is_abs: true
              start: [0, 10, 0]
              end: [40, 50, 150]
            volumes_not_refine:
              - is_abs: true
                start: [0, 10, 0]
                end: [40, 50, 150]
              - is_abs: false
                start: [0, 0.15, 0.1]
                end: [0.1, 0.2, 0.3]
      point_clouds:
        tree:
          IBM:
            run: True
            cfg_use: tree_cfg
            order: 1
            interval_run:
              end_step: 0
              start_step: 0
          csv_path: fixture/point_cloud/sphere_100.csv
      bodies: !not-inherit
        CAARC:
          IBM:
            run: True
            cfg_use: building_cfg
            order: 1
            interval_run:
              end_step: 0
              start_step: 0
          lnas_path: fixture/lnas/wind_tunnel/CAARC.lnas
          small_triangles: "error" # | "add" | "remove"
          area: { min: 0.25, max: 1 }
          volumes_limits:
            raw:
              - start: [10, 20, 0]
                end: [100, 100, 100]
            body_transformed:
              - start: [60, 40, 0]
                end: [100, 200, 100]
            full_transformed:
              - start: [60, 40, 0]
                end: [100, 200, 100]
              - start: [100, 40, 50]
                end: [150, 140, 70]
          transformation:
            fixed_point: [0, 0, 0]
            rotation: [0, 0, 0]
            scale: [1.0, 1.0, 1.0]
            translation: [12.0, 0.0, 1.0]
        cube_not_run:
          IBM:
            run: False
            cfg_use: terrain_cfg
          lnas_path: fixture/lnas/basic/cube.lnas
          transformation:
            fixed_point: [0, 0, 0]
            rotation: [0, 0, 0]
            scale: [1.0, 1.0, 1.0]
            translation: [12.0, 0.0, 1.0]
      bodies_domain_limits:
        start: [8.0, 4.0, 0.0]
        end: [448.0, 156.0, 48.0]
        is_abs: true
      global_transformations:
        - transformation:
            translation: [0, 0.5, 0]
            fixed_point: [608.90625, 64, 0]
            rotation: [0, 0, 3.141592654]
            scale: [1, 1, 1]
          point_clouds_apply: []
          bodies_apply: ["CAARC"]
          probes_apply:
            [
              "series.series1.lines",
              "series.series1.points.point1",
              "series.another_series",
            ]
          apply_to_bodies_probes: false
        - transformation:
            translation: [50, -10, 0]
          point_clouds_apply: []
          bodies_apply: []
          probes_apply: ["spectrum.downstream", "spectrum.upstream"]
          apply_to_bodies_probes: true
    checkpoint:
      export:
        interval: { end_step: 30000, frequency: 5000, start_step: 10000 }
        finish_save: true
        keep_only_last_checkpoint: false
      load:
        checkpoint_start: true
        reset_time_step: false
        folderpath: "path/to/checkpoint/folder"
    data:
      divergence: { end_step: 0, frequency: 50, start_step: 0 }
      monitors:
        fields:
          # monitor_name:
          #   ... specs
          rho_max:
            macrs: [rho]
            stats: [max, pos]
            interval: { start_step: 500, end_step: 10000, frequency: 50 }
            macrs_rescale: *MACRS_RESCALE
            time_rescale: 1
          macrs_stats:
            macrs: [rho, u, S]
            stats: [min, max, mean]
            interval: { start_step: 0, end_step: 0, frequency: 500 }
            macrs_rescale: *MACRS_RESCALE
            time_rescale: 2.45
            volumes_monitor:
              - start: [10, 20, 0]
                end: [100, 100, 100]
                is_abs: true
              - start: [0.1, 0.1, 0.1]
                end: [0.9, 0.9, 0.9]
                is_abs: false
            volumes_ignore:
              - start: [50, 60, 5]
                end: [70, 120, 10]
                is_abs: true
      probes:
        historic_series:
          series1:
            formats_export: [csv, hdf]
            macrs: [rho, u]
            interval:
              start_step: 78
              end_step: 0
              frequency: 10
              lvl: 4
            macrs_rescale: *MACRS_RESCALE
            time_rescale: 10
            interval_group: 322
            lines:
              line1:
                start_pos: [200.46875, 79.4285, 2.905]
                end_pos: [200.46875, 80.5715, 2.905]
                dist: 0.28575
            points:
              point1:
                pos: [200.46875, 79.4285, 2.905]
            bodies:
              my_CAARC:
                body_name: "CAARC"
                normal_offset: 0.03125
                element_type: "cell" # or "vertex"
              my_surface:
                body_name: "CAARC.surface_name"
                normal_offset: -0.03125
                element_type: "cell" # or "vertex"
            csvs:
              my_csv:
                filename: "my_filename.csv"
              my_other_csv:
                filename: "another csv"
          another_series:
            macrs: [u, S]
            time_rescale: 2.3
            macrs_rescale:
              ux:
                mul: 51
                cte: 0
            interval:
              frequency: 10
              lvl: 4
            lines:
              line1:
                start_pos: [200.46875, 79.4285, 2.905]
                end_pos: [200.46875, 80.5715, 2.905]
                dist: 0.28575
        spectrum_analysis:
          macrs: [rho, u]
          time_rescale: 10.3
          macrs_rescale: *MACRS_RESCALE
          points:
            upstream:
              pos: [200.46875, 80.0, 4.81]
            downstream:
              pos: [201.48375, 80.0, 4.81]
      statistics:
        interval:
          start_step: 78
          end_step: 0
          frequency: 10
        volume_stats:
          start: [32, 0, 0]
          end: [448, 128, 64]
          is_abs: true
        macrs_1st_order: [rho, u]
        macrs_2nd_order: [rho, u]
        exports:
          default:
            interval:
              frequency: 5000
          export_area2:
            time_rescale: 5.67
            macrs_rescale: *MACRS_RESCALE
            volume_export:
              start: [32, 0, 0]
              end: [448, 128, 64]
              is_abs: true
            interval:
              frequency: 50
      instantaneous:
        default:
          interval:
            start_step: 78
            end_step: 0
            frequency: 10
          volume_export:
            start: [32, 0, 0]
            end: [448, 128, 64]
            is_abs: true
          macrs: ["rho", "S"]
          time_rescale: 1
          macrs_rescale: *MACRS_RESCALE
          max_lvl: 3
        export_area2:
          interval:
            frequency: 10
          macrs: ["u", "rho", "Sxx"]
          macrs_rescale: *MACRS_RESCALE
          time_rescale: 1
      export_IBM_nodes:
        start_step: 0
        end_step: 0
        frequency: 0
    models:
      engine:
        devices_numbers: null
        n_devices: 1
        name: CUDA
      precision:
        calculations: default
        default: single
        macroscopics: default
        populations: default

      multiblock:
        overlap_F2C: 2
        custom_overlap_F2C:
          1: 3
          4: 2
        stress_filter_F2C: 1
      LES:
        model: Smagorinsky
        sgs_cte: 0.17
      LBM:
        F: { x: 0, y: 0, z: 0 }
        coll_oper: RRBGK
        coll_oper_params:
          sigma_hrrbgk: 0.99
          mode_hrrbgk: dynamic
        thermal_model: false
        tau: 0.5000008125
        vel_set: D3Q27
      IBM:
        dirac_delta: 3_points
        min_dirac_sum: 0.99
        forces_accomodate_time: 500
        forces_spread_limit: 1e-3
        reset_forces: false
        body_cfgs:
          default: {}
          building_cfg:
            n_iterations: 5
            forces_factor: 1
            kinetic_energy_correction: false
            wall_model:
              name: EqTBL
              dist_ref: 2
              dist_shell: 0.25
              start_step: 1000
              params:
                z0: 0.0001
                TDMA_max_error: 5e-06
                TDMA_max_iters: 50
                TDMA_n_div: 25
            visc_correction: true
          terrain_cfg:
            n_iterations: 3
            forces_factor: 1
            kinetic_energy_correction: false
            wall_model:
              name: EqLog
              dist_ref: 2.5
              dist_shell: 0.5
              params:
                z0: 0.0001
            visc_correction: false
          tree_cfg:
            n_iterations: 5
            forces_factor: 0.12
            kinetic_energy_correction: true

      initialization:
        vtm_filename: ./fixture/vtms/multiblock_load.vtm
        rho: 1
        u: { x: 0, y: 0, z: 0 }
      BC:
        periodic_dims: [false, false, false]
        WM_cfg:
          TDMA_max_error: 5e-06
          TDMA_max_iters: 50
          TDMA_n_div: 25
        BC_map:
          - BC: RegularizedNeumannOutlet
            order: 2
            pos: E
            wall_normal: E
            rho: 1.0
          - BC: RegularizedNeumannSlip
            order: 1
            pos: F
            wall_normal: F
          - BC: RegularizedHWBB
            order: 1
            pos: B
            wall_normal: B
          - BC: RegularizedNeumannSlip
            order: 0
            pos: N
            wall_normal: N
          - BC: RegularizedNeumannSlip
            order: 0
            pos: S
            wall_normal: S
          - BC: Neumann
            order: 0
            pos: NF
            wall_normal: N
          - BC: Neumann
            order: 0
            pos: SF
            wall_normal: S
        SEM:
          eddies:
            lengthscale: { x: 14, y: 14, z: 14 }
            eddies_vol_density: 10
            seed_rand: 0
            domain_limits_yz:
              start: [16, 0]
              end: [48, 96]
          profile:
            csv_profile_data: "fixture/SEM/example/real_profile.csv"
            z_offset: 0
            K: 1
            csv_y_height: "fixture/SEM/example/y_heights.csv"
            length_mul: 1
            vel_mul: 1

    debug:
      IBM: { no_force_spread: false, no_nodes_export: false }
      LBM: { collision_only: false, no_macrs_export: false, streaming_only: false }
      code_generation: { load_generated_files: false }
      multiblock: { export_comm_vtk: false, run_communication: true }
      output_IBM_nodes: false
      output_only: false
      profile: false