#Main parameters =========================
# run

SURFACE_SET surf_set001 VARIABLE_VISCOSITY  = FALSE
SURFACE_SET surf_set001 VISCOSITY_RATIO  = 5.0

SHEAR_RATE = 1250
FOURIER = 0.5

NITER_MAX = 2500
DUMP_TIME_PERIOD = 1.0E-3
DUMP_SURF_TIME_PERIOD = 1.0E-4

KINEMATIC_VISCOSITY = 7.81250E-8
BOUNDARY y0 U = -1.875E-2 0.0 0.0
BOUNDARY y1 U = 1.875E-2 0.0 0.0

##################################
SOLVER_NAME = 'rbc_shear_30microns'
SOLVER_TYPE = RBC
NDIM = 3
CFL = 0.9
MOMENTUM_SOURCE_NUMBER=0.14
ITER_INFO_PERIOD = 10

DEBUG_RBCS = FALSE

# schemes
TIME_INT = RK4
SPACE_INT = 4TH
IMPLICIT_DIFFUSION = FALSE

REAL_IMPLICIT_DIFFUSION = TRUE
IMPLICIT_CONVERGENCE = 5.0E-26
ID_SOLVER = PCG

# debug
DEBUG_LEVEL_MASTER = 3
DEBUG_LEVEL_SLAVE = 1
DEBUG_WAIT = 0

# Grid partitioning
NELEMENTPERGROUP = 500

# parameters
TURBULENCE_MODEL = NONE
POISSON_SOLVER = DPCG
PRESSURE_CONVERGENCE =  3.E-16
NRECYCLED_RHS = 3
#Q_CRITERION = 2
MAIN_GRID_REFINEMENT = 0
DENSITY = 1000.0
HALO_SIZE = 0.353E-06
#EXACT_RESTART = TRUE
#GEOMETRIC_TOLERANCE = 1.0E-7

#############################
#BEGIN SURFACE SET PARAMETERS
#############################
#NUMBER OF RBCS IN THE SURFACE SET
SURFACE_SET surf_set001 N_RBC = 1024

#RESTART FROM MESH
#SURFACE_SET surf_set001 STL_MESH = 'meshes/globule_bille_5006fa.stl'
#SURFACE_SET surf_set001 RESTART_TYPE = "STL_MESH"
#SURFACE_SET surf_set001 SCALING_MESH = 1.0E-06
#SURFACE_SET surf_set001 REFERENCE_MEMBRANE_STATE = INITIAL

#FROM RESTART
SURFACE_SET surf_set001 RESTART_TYPE = "HDF"
SURFACE_SET surf_set001 NPART = 28
SURFACE_SET surf_set001 RESTART_HDF_MESH = './restart/channel_30x10_dx0.345micr.sol000010.surf_set001_**.sol.h5'

SURFACE_SET surf_set001 REFERENCE_MEMBRANE_STATE = FROM_RESTART


#FROM EQSHAPE
#SURFACE_SET surf_set001 RESTART_TYPE = "EQSHAPE"
#SURFACE_SET surf_set001 NPART = 1
#SURFACE_SET surf_set001 RESTART_HDF_MESH = 'restart_cell_NB1_RKPM2/cell.sol000050.surf_set001_1.sol.h5'
#SURFACE_SET surf_set001 REFERENCE_MEMBRANE_STATE = FROM_RESTART

#MECHANICAL PROPERTIES
SURFACE_SET surf_set001 SURFACES_TYPE = MEMBRANE
SURFACE_SET surf_set001 MEMBRANE_PHYSICS = HEC
SURFACE_SET surf_set001 REF_VOLUME = 9.28E-17
SURFACE_SET surf_set001 REF_SURFACE = 1.33E-10
SURFACE_SET surf_set001 VOL_CORRECTION = 1
SURFACE_SET surf_set001 ELASTIC_MODULUS = 0.0
SURFACE_SET surf_set001 CURVATURE_MODULUS = 3.0E-19
SURFACE_SET surf_set001 AREA_MODULUS = 0.0
SURFACE_SET surf_set001 REF_AREA_DIFFERENCE = 0.0
SURFACE_SET surf_set001 BILAYER_THICKNESS = 0.0
SURFACE_SET surf_set001 ADE_PENALTY = 0.0
SURFACE_SET surf_set001 GRID_SPAC = 0.353E-06
SURFACE_SET surf_set001 HYPERELASTIC_LAW = SK
SURFACE_SET surf_set001 SK_SHEAR_MODULUS = 2.5E-6
SURFACE_SET surf_set001 SK_AREA_TO_SHEAR_RATIO = 10.0
SURFACE_SET surf_set001 C0 = 0.0

SURFACE_SET surf_set001 MEMBRANE_TO_INTERNAL_VISCOSITY_RATIO  = 0.0
VARIABLE_VISCOSITY_CORRECTION  = ROUGH
VISCOSITY_CONVERGENCE = 1.0E-11

#CALCULATION PARAMETERS
#SURFACE_SET surf_set001 DUMP_TENSIONS = TRUE
SURFACE_SET surf_set001 UNSTRUCTURED_FLUID_GRID = TRUE
SURFACE_SET surf_set001 RKPM_ORDER = 2
SURFACE_SET surf_set001 NB_RINGS = 1

#REPULSIVE FORCES
SURFACE_SET surf_set001 REPULSIVE_FORCES = TRUE
SURFACE_SET surf_set001 REPULSIVE_FORCES_TYPE = LENNARD-JONES
SURFACE_SET surf_set001 ZERO_FORCE_DISTANCE = 0.353E-06
SURFACE_SET surf_set001 REPULSIVE_ENERGY = 1.2E-23

##############################
##END SURFACE SET PARAMETERS
##############################

# Particles
PARTICLE_SET ptset1 DRAG = TRACER
PARTICLE_SET ptset1 RESTART_TYPE = HDF
PARTICLE_SET ptset1 RESTART_NPART = 28
PARTICLE_SET ptset1 RESTART_HDF_SOLUTION = "./restart/channel_30x10_dx0.345micr.sol000010.ptset1_**.sol.h5"

# Restart =================================

RESTART_TYPE = HDF
RESTART_NPART = 28
RESTART_HDF_MESH = './restart/channel_30x10_dx0.345micr.sol000000_**.mesh.h5'
RESTART_HDF_SOLUTION = './restart/channel_30x10_dx0.345micr.sol000010_**.sol.h5'

#RESTART_TYPE = CART
CART_NX = 448
CART_NY = 168
CART_NZ = 224
CART_X_MIN = -8.0E-5
CART_X_MAX = 8.0E-5
CART_Y_MIN = -3.00E-5
CART_Y_MAX = 3.00E-5
CART_Z_MIN = -4.0E-5
CART_Z_MAX = 4.0E-5

# boundaries ==============================
BOUNDARY x0 DESCRIPTION = 'Channel inlet'
BOUNDARY x0 TYPE = PERIODIC
BOUNDARY x0 LABEL = 'X'

BOUNDARY x1 DESCRIPTION = 'Channel outlet'
BOUNDARY x1 TYPE = PERIODIC
BOUNDARY x1 LABEL = 'X'

BOUNDARY y0 DESCRIPTION = 'Lower wall'
BOUNDARY y0 TYPE = WALL
BOUNDARY y0 WALL_TYPE = TRANSLATING
BOUNDARY y0 LABEL = 'Y'

BOUNDARY y1 DESCRIPTION = 'Upper wall'
BOUNDARY y1 TYPE = WALL
BOUNDARY y1 WALL_TYPE = TRANSLATING
BOUNDARY y1 LABEL = 'Y'

BOUNDARY z0 DESCRIPTION = 'Bottom wall'
BOUNDARY z0 TYPE = PERIODIC
BOUNDARY z0 LABEL = 'Z'

BOUNDARY z1 DESCRIPTION = 'Top wall'
BOUNDARY z1 TYPE = PERIODIC
BOUNDARY z1 LABEL = 'Z'

# Dump ====================================
DUMP_TYPE = HDF
DUMP_NPART = 28
DUMP_PREFIX = 'dump/channel_30x10_dx0.345micr.sol'
DUMP_PREFIX1 = 'dump/surface.sol'
