SHARE
TWEET

Untitled

a guest Feb 24th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // physical parameters
  2. MU  = 1.0e-2                              // fluid viscosity
  3. RHO = 1.0                                 // fluid density
  4. L   = 1.0
  5.  
  6. // grid spacing parameters
  7. MAX_LEVELS = 2                            // maximum number of levels in locally refined grid
  8. REF_RATIO  = 4                            // refinement ratio between levels
  9. N = 64                                    // actual    number of grid cells on coarsest grid level
  10. NFINEST = (REF_RATIO^(MAX_LEVELS - 1))*N  // effective number of grid cells on finest   grid level
  11.  
  12. // solver parameters
  13. SOLVER_TYPE        = "STAGGERED"          // the fluid solver to use (STAGGERED or COLLOCATED)
  14. CFL_MAX            = 0.3                  // maximum CFL number
  15. DT_MAX             = 0.0625/NFINEST       // maximum timestep size
  16. START_TIME         = 0.0e0                // initial simulation time
  17. END_TIME           = 100000000000*DT_MAX  // final simulation time
  18. GROW_DT            = 2.0e0                // growth factor for timesteps
  19. NUM_CYCLES         = 3                    // number of cycles of fixed-point iteration
  20. CONVECTIVE_TS_TYPE = "MIDPOINT_RULE"      // convective time stepping type
  21. CONVECTIVE_OP_TYPE = "PPM"                // convective differencing discretization type
  22. CONVECTIVE_FORM    = "ADVECTIVE"          // how to compute the convective terms
  23. NORMALIZE_PRESSURE = TRUE                 // whether to explicitly force the pressure to have mean zero
  24. VORTICITY_TAGGING  = TRUE                 // whether to tag cells for refinement based on vorticity thresholds
  25. TAG_BUFFER         = 1                    // sized of tag buffer used by grid generation algorithm
  26. REGRID_INTERVAL    = 10000000             // effectively disable regridding
  27. OUTPUT_U           = TRUE
  28. OUTPUT_P           = TRUE
  29. OUTPUT_F           = FALSE
  30. OUTPUT_OMEGA       = TRUE
  31. OUTPUT_DIV_U       = TRUE
  32. OUTPUT_EE          = TRUE
  33. ENABLE_LOGGING     = TRUE
  34.  
  35. // collocated solver parameters
  36. PROJECTION_METHOD_TYPE = "PRESSURE_UPDATE"
  37. SECOND_ORDER_PRESSURE_UPDATE = TRUE
  38.  
  39. // exact solution function expressions
  40. U = "1.0 + exp(-4.0*PI*PI*nu*t)*(C*cos(2*PI*(X_1-t)) + A*sin(2*PI*(X_2-t)))"
  41. V = "1.0 + exp(-4.0*PI*PI*nu*t)*(B*sin(2*PI*(X_0-t)) + A*cos(2*PI*(X_2-t)))"
  42. W = "1.0 + exp(-4.0*PI*PI*nu*t)*(B*cos(2*PI*(X_0-t)) + C*sin(2*PI*(X_1-t)))"
  43. P = "-exp(-8.0*PI*PI*nu*t)*(A*C*cos(2*PI*(X_1-t))*sin(2*PI*(X_2-t)) + A*B*sin(2*PI*(X_0-t))*cos(2*PI*(X_2-t)) + B*C*cos(2*PI*(X_0-t))*sin(2*PI*(X_1-t)))"
  44.  
  45. VelocityInitialConditions {
  46.    nu = MU/RHO
  47.    A = 1.0
  48.    B = 1.0
  49.    C = 1.0
  50.    function_0 = U
  51.    function_1 = V
  52.    function_2 = W
  53. }
  54.  
  55. VelocityBcCoefs_0 {
  56.    nu = MU/RHO
  57.  
  58.    acoef_function_0 = "1.0"
  59.    acoef_function_1 = "1.0"
  60.    acoef_function_2 = "1.0"
  61.    acoef_function_3 = "1.0"
  62.    acoef_function_4 = "1.0"
  63.    acoef_function_5 = "1.0"
  64.  
  65.    bcoef_function_0 = "0.0"
  66.    bcoef_function_1 = "0.0"
  67.    bcoef_function_2 = "0.0"
  68.    bcoef_function_3 = "0.0"
  69.    bcoef_function_4 = "0.0"
  70.    bcoef_function_5 = "0.0"
  71.  
  72.    gcoef_function_0 = U
  73.    gcoef_function_1 = U
  74.    gcoef_function_2 = U
  75.    gcoef_function_3 = U
  76.    gcoef_function_4 = U
  77.    gcoef_function_5 = U
  78. }
  79.  
  80. VelocityBcCoefs_1 {
  81.    nu = MU/RHO
  82.  
  83.    acoef_function_0 = "1.0"
  84.    acoef_function_1 = "1.0"
  85.    acoef_function_2 = "1.0"
  86.    acoef_function_3 = "1.0"
  87.    acoef_function_4 = "1.0"
  88.    acoef_function_5 = "1.0"
  89.  
  90.    bcoef_function_0 = "0.0"
  91.    bcoef_function_1 = "0.0"
  92.    bcoef_function_2 = "0.0"
  93.    bcoef_function_3 = "0.0"
  94.    bcoef_function_4 = "0.0"
  95.    bcoef_function_5 = "0.0"
  96.  
  97.    gcoef_function_0 = V
  98.    gcoef_function_1 = V
  99.    gcoef_function_2 = V
  100.    gcoef_function_3 = V
  101.    gcoef_function_4 = V
  102.    gcoef_function_5 = V
  103. }
  104.  
  105. VelocityBcCoefs_2 {
  106.    nu = MU/RHO
  107.  
  108.    acoef_function_0 = "1.0"
  109.    acoef_function_1 = "1.0"
  110.    acoef_function_2 = "1.0"
  111.    acoef_function_3 = "1.0"
  112.    acoef_function_4 = "1.0"
  113.    acoef_function_5 = "1.0"
  114.  
  115.    bcoef_function_0 = "0.0"
  116.    bcoef_function_1 = "0.0"
  117.    bcoef_function_2 = "0.0"
  118.    bcoef_function_3 = "0.0"
  119.    bcoef_function_4 = "0.0"
  120.    bcoef_function_5 = "0.0"
  121.  
  122.    gcoef_function_0 = W
  123.    gcoef_function_1 = W
  124.    gcoef_function_2 = W
  125.    gcoef_function_3 = W
  126.    gcoef_function_4 = W
  127.    gcoef_function_5 = W
  128. }
  129.  
  130. PressureInitialConditions {
  131.    nu = MU/RHO
  132.    A = 1.0
  133.    B = 1.0
  134.    C = 1.0
  135.    function = P
  136. }
  137.  
  138. INSCollocatedHierarchyIntegrator {
  139.    mu                            = MU
  140.    rho                           = RHO
  141.    start_time                    = START_TIME
  142.    end_time                      = END_TIME
  143.    grow_dt                       = GROW_DT
  144.    num_cycles                    = NUM_CYCLES
  145.    convective_time_stepping_type = CONVECTIVE_TS_TYPE
  146.    convective_op_type            = CONVECTIVE_OP_TYPE
  147.    convective_difference_form    = CONVECTIVE_FORM
  148.    normalize_pressure            = NORMALIZE_PRESSURE
  149.    cfl                           = CFL_MAX
  150.    dt_max                        = DT_MAX
  151.    using_vorticity_tagging       = VORTICITY_TAGGING
  152.    vorticity_rel_thresh          = 0.25,0.125
  153.    tag_buffer                    = TAG_BUFFER
  154.    regrid_interval               = REGRID_INTERVAL
  155.    output_U                      = OUTPUT_U
  156.    output_P                      = OUTPUT_P
  157.    output_F                      = OUTPUT_F
  158.    output_Omega                  = OUTPUT_OMEGA
  159.    output_Div_U                  = OUTPUT_DIV_U
  160.    enable_logging                = ENABLE_LOGGING
  161.    projection_method_type        = PROJECTION_METHOD_TYPE
  162.    use_2nd_order_pressure_update = SECOND_ORDER_PRESSURE_UPDATE
  163.  
  164.    velocity_solver_type = "PETSC_KRYLOV_SOLVER"
  165.    velocity_precond_type = "POINT_RELAXATION_FAC_PRECONDITIONER"
  166.    velocity_solver_db {
  167.       ksp_type = "fgmres"
  168.    }
  169.    velocity_precond_db {
  170.       num_pre_sweeps  = 0
  171.       num_post_sweeps = 3
  172.       prolongation_method = "LINEAR_REFINE"
  173.       restriction_method  = "CONSERVATIVE_COARSEN"
  174.       coarse_solver_type  = "HYPRE_LEVEL_SOLVER"
  175.       coarse_solver_rel_residual_tol = 1.0e-12
  176.       coarse_solver_abs_residual_tol = 1.0e-50
  177.       coarse_solver_max_iterations = 1
  178.       coarse_solver_db {
  179.          solver_type          = "PFMG"
  180.          num_pre_relax_steps  = 0
  181.          num_post_relax_steps = 3
  182.          enable_logging       = FALSE
  183.       }
  184.    }
  185.  
  186.    pressure_solver_type = "PETSC_KRYLOV_SOLVER"
  187.    pressure_precond_type = "POINT_RELAXATION_FAC_PRECONDITIONER"
  188.    pressure_solver_db {
  189.       ksp_type = "fgmres"
  190.    }
  191.    pressure_precond_db {
  192.       num_pre_sweeps  = 0
  193.       num_post_sweeps = 3
  194.       prolongation_method = "LINEAR_REFINE"
  195.       restriction_method  = "CONSERVATIVE_COARSEN"
  196.       coarse_solver_type  = "HYPRE_LEVEL_SOLVER"
  197.       coarse_solver_rel_residual_tol = 1.0e-12
  198.       coarse_solver_abs_residual_tol = 1.0e-50
  199.       coarse_solver_max_iterations = 1
  200.       coarse_solver_db {
  201.          solver_type          = "PFMG"
  202.          num_pre_relax_steps  = 0
  203.          num_post_relax_steps = 3
  204.          enable_logging       = FALSE
  205.       }
  206.    }
  207.  
  208.    regrid_projection_solver_type = "PETSC_KRYLOV_SOLVER"
  209.    regrid_projection_precond_type = "POINT_RELAXATION_FAC_PRECONDITIONER"
  210.    regrid_projection_solver_db {
  211.       ksp_type = "fgmres"
  212.    }
  213.    regrid_projection_precond_db {
  214.       num_pre_sweeps  = 0
  215.       num_post_sweeps = 3
  216.       prolongation_method = "LINEAR_REFINE"
  217.       restriction_method  = "CONSERVATIVE_COARSEN"
  218.       coarse_solver_type  = "HYPRE_LEVEL_SOLVER"
  219.       coarse_solver_rel_residual_tol = 1.0e-12
  220.       coarse_solver_abs_residual_tol = 1.0e-50
  221.       coarse_solver_max_iterations = 1
  222.       coarse_solver_db {
  223.          solver_type          = "PFMG"
  224.          num_pre_relax_steps  = 0
  225.          num_post_relax_steps = 3
  226.          enable_logging       = FALSE
  227.       }
  228.    }
  229. }
  230.  
  231. INSStaggeredHierarchyIntegrator {
  232.    mu                            = MU
  233.    rho                           = RHO
  234.    start_time                    = START_TIME
  235.    end_time                      = END_TIME
  236.    grow_dt                       = GROW_DT
  237.    num_cycles                    = NUM_CYCLES
  238.    convective_time_stepping_type = CONVECTIVE_TS_TYPE
  239.    convective_op_type            = CONVECTIVE_OP_TYPE
  240.    convective_difference_form    = CONVECTIVE_FORM
  241.    normalize_pressure            = NORMALIZE_PRESSURE
  242.    cfl                           = CFL_MAX
  243.    dt_max                        = DT_MAX
  244.    using_vorticity_tagging       = VORTICITY_TAGGING
  245.    vorticity_rel_thresh          = 0.25,0.125
  246.    tag_buffer                    = TAG_BUFFER
  247.    regrid_interval               = REGRID_INTERVAL
  248.    output_U                      = OUTPUT_U
  249.    output_P                      = OUTPUT_P
  250.    output_F                      = OUTPUT_F
  251.    output_Omega                  = OUTPUT_OMEGA
  252.    output_Div_U                  = OUTPUT_DIV_U
  253.    output_EE                     = OUTPUT_EE
  254.    enable_logging                = ENABLE_LOGGING
  255.  
  256.    stokes_solver_type = "PETSC_KRYLOV_SOLVER"
  257.    stokes_precond_type = "PROJECTION_PRECONDITIONER"
  258.    stokes_solver_db {
  259.       ksp_type = "fgmres"
  260.    }
  261.  
  262.    velocity_solver_type = "PETSC_KRYLOV_SOLVER"
  263.    velocity_precond_type = "POINT_RELAXATION_FAC_PRECONDITIONER"
  264.    velocity_solver_db {
  265.       ksp_type = "richardson"
  266.       max_iterations = 1
  267.       rel_residual_tol = 1.0e-1
  268.    }
  269.    velocity_precond_db {
  270.       num_pre_sweeps  = 0
  271.       num_post_sweeps = 3
  272.       prolongation_method = "CONSERVATIVE_LINEAR_REFINE"
  273.       restriction_method  = "CONSERVATIVE_COARSEN"
  274.       coarse_solver_type  = "PETSC_LEVEL_SOLVER"
  275.       coarse_solver_rel_residual_tol = 1.0e-12
  276.       coarse_solver_abs_residual_tol = 1.0e-50
  277.       coarse_solver_max_iterations = 100
  278.       coarse_solver_db {
  279.         ksp_type = "gmres"
  280.         pc_type = "jacobi"
  281.       }
  282.    }
  283.  
  284.    pressure_solver_type = "PETSC_KRYLOV_SOLVER"
  285.    pressure_precond_type = "POINT_RELAXATION_FAC_PRECONDITIONER"
  286.    pressure_solver_db {
  287.       ksp_type = "richardson"
  288.       max_iterations = 1
  289.       rel_residual_tol = 1.0e-1
  290.    }
  291.    pressure_precond_db {
  292.       num_pre_sweeps  = 0
  293.       num_post_sweeps = 3
  294.       prolongation_method = "LINEAR_REFINE"
  295.       restriction_method  = "CONSERVATIVE_COARSEN"
  296.       coarse_solver_type  = "PETSC_LEVEL_SOLVER"
  297.       coarse_solver_rel_residual_tol = 1.0e-12
  298.       coarse_solver_abs_residual_tol = 1.0e-50
  299.       coarse_solver_max_iterations = 100
  300.       coarse_solver_db {
  301.         ksp_type = "gmres"
  302.         pc_type = "jacobi"
  303.       }
  304.    }
  305.  
  306.    regrid_projection_solver_type = "PETSC_KRYLOV_SOLVER"
  307.    regrid_projection_precond_type = "POINT_RELAXATION_FAC_PRECONDITIONER"
  308.    regrid_projection_solver_db {
  309.       ksp_type = "fgmres"
  310.    }
  311.    regrid_projection_precond_db {
  312.       num_pre_sweeps  = 0
  313.       num_post_sweeps = 3
  314.       prolongation_method = "LINEAR_REFINE"
  315.       restriction_method  = "CONSERVATIVE_COARSEN"
  316.       coarse_solver_type  = "HYPRE_LEVEL_SOLVER"
  317.       coarse_solver_rel_residual_tol = 1.0e-12
  318.       coarse_solver_abs_residual_tol = 1.0e-50
  319.       coarse_solver_max_iterations = 1
  320.       coarse_solver_db {
  321.          solver_type          = "PFMG"
  322.          num_pre_relax_steps  = 0
  323.          num_post_relax_steps = 3
  324.          enable_logging       = FALSE
  325.       }
  326.    }
  327. }
  328.  
  329. Main {
  330.    solver_type = SOLVER_TYPE
  331.  
  332. // log file parameters
  333.    log_file_name               = "INS3d.log"
  334.    log_all_nodes               = FALSE
  335.  
  336. // visualization dump parameters
  337.    viz_writer                  = "VisIt"
  338.    viz_dump_interval           = 5000
  339.    viz_dump_dirname            = "viz_INS3d"
  340.    visit_number_procs_per_file = 1
  341.  
  342. // restart dump parameters
  343.    restart_dump_interval       = 0
  344.    restart_dump_dirname        = "restart_INS3d"
  345.  
  346. // timer dump parameters
  347.    timer_dump_interval         = 0
  348. }
  349.  
  350. CartesianGeometry {
  351.    domain_boxes = [ (0,0,0),(N - 1,N - 1,N - 1) ]
  352.    x_lo = 0,0,0
  353.    x_up = L,L,L
  354.    periodic_dimension = 1,1,1
  355. }
  356.  
  357. GriddingAlgorithm {
  358.    max_levels = MAX_LEVELS
  359.    ratio_to_coarser {
  360.       level_1 = REF_RATIO,REF_RATIO,REF_RATIO
  361.       level_2 = REF_RATIO,REF_RATIO,REF_RATIO
  362.       level_3 = REF_RATIO,REF_RATIO,REF_RATIO
  363.    }
  364.    largest_patch_size {
  365.       level_0 = 512,512,512  // all finer levels will use same values as level_0
  366.    }
  367.    smallest_patch_size {
  368.       level_0 =   4,  4,  4  // all finer levels will use same values as level_0
  369.    }
  370.    efficiency_tolerance = 0.85e0  // min % of tag cells in new patch level
  371.    combine_efficiency   = 0.85e0  // chop box if sum of volumes of smaller boxes < efficiency * vol of large box
  372. }
  373.  
  374. StandardTagAndInitialize {
  375.    tagging_method = "REFINE_BOXES"
  376.    RefineBoxes {
  377.       level_0 = [((REF_RATIO^0)*N/4 + 0,(REF_RATIO^0)*N/4 + 0,(REF_RATIO^0)*N/4 + 0),(3*(REF_RATIO^0)*N/4 - 1,3*(REF_RATIO^0)*N/4 - 1,3*(REF_RATIO^0)*N/4 - 1)]
  378.       level_1 = [((REF_RATIO^1)*N/4 + 1,(REF_RATIO^1)*N/4 + 1,(REF_RATIO^1)*N/4 + 1),(3*(REF_RATIO^1)*N/4 - 2,3*(REF_RATIO^1)*N/4 - 2,3*(REF_RATIO^1)*N/4 - 2)]
  379.       level_2 = [((REF_RATIO^2)*N/4 + 2,(REF_RATIO^2)*N/4 + 2,(REF_RATIO^2)*N/4 + 2),(3*(REF_RATIO^2)*N/4 - 3,3*(REF_RATIO^2)*N/4 - 3,3*(REF_RATIO^2)*N/4 - 3)]
  380.    }
  381. }
  382.  
  383. LoadBalancer {
  384.    bin_pack_method     = "SPATIAL"
  385.    max_workload_factor = 1
  386. }
  387.  
  388. TimerManager{
  389.    print_exclusive = FALSE
  390.    print_total     = TRUE
  391.    print_threshold = 0.1
  392.    timer_list      = "IBAMR::*::*","IBTK::*::*","*::*::*"
  393. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top