# Start up file for citcom using getpar.


# 1. Input and Output Files Information

	datafile="no_initial_strn/caseA"	# directory and file head for output files.
	use_scratch="local_subdir"	# output files under current directory.
#	use_scratch="leng"	# output files onto local disk to each compute node. 

	oldfile="CASESC_F_L1/caseA"	# directory and file head for restart files.
	restart=0		# check Convection.c for different options
	restart_timesteps=245000	# timestep to restart
	restart_format=1        # format of restart files, 0:ascii, 1:binary

	stokes_flow_only=0	# 1: only solve velocity once; 0: time-dependent problem.
	maxstep=30000 		# max time steps
	storage_spacing=500	# write data every ...
        output_format=0         # format of output files, 0:ascii, 1:binary

# 1.0 Material Information
	num_mat=7		 # number of material group with possibly different physical property,from 0 to num_mat-1
	mat_x1=0.00000,1.50000,1.50000,1.50000,0.00000,0.00000,0.00000	#0.90000
	mat_x2=4.50000,4.45000,4.45000,4.45000,1.50000,1.50000,0.00000	#1.00000
	mat_y1=0.00000,0.05000,0.05000,0.05000,0.05000,0.05000,0.00000	#2.00000
	mat_y2=4.50000,3.00000,3.00000,3.00000,4.50000,4.50000,0.00000	#2.90000
	mat_z1=0.00000,0.98939,0.95454,0.92424,0.96969,0.90909,0.00000	#0.90909
	mat_z2=1.00000,1.00000,0.98939,0.95454,1.00000,0.96969,0.00000	#1.00000

	mat_density=1.0,0.84848,1.0,1.0,0.84848,1.0,1.0 	#material density
	bulk_visc_ratio=-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0

	therm_diff=1.0,1.0,1.0,1.0,1.0,1.0,1.0

# 1.1 Elasticity Related Information
	fixed_timestep=5.0e-8 	# override the timestep if != 0.0 (default=0.0=ignored)
	elasticity=on		# include elasticity
	stress_rotation=on	# include stress rotation term for elasticity, see Moresi et al. 2002, Pure appl. geophys.
	elastic_timestep=5.0e-8	# elastic time step
	
	elas_shear_modulus=1.3068e8,1.3068e8,1.3068e8,1.3068e8,1.3068e8,1.3068e8,1.3068e8
	elas_bulk_modulus=0.0,0.0,0.0,0.0,0.0,0.0,0.0
	
# 1.2 Plasticity Related Information
	plasticity=on		# include plasticity
	
	plas_miu0=0.5,0.5,0.5,0.0,0.5,0.5,0.0			#initial coefficient of friction
	plas_C0=1.7424e5,1.7424e5,1.7424e5,0.0,1.7424e5,1.7424e5,2.6136e3			#initial cohesion
	plas_Cf=2.6136e3,2.6136e3,2.6136e3,0.0,2.6136e3,2.6136e3,2.6136e3			#final cohesion after plastic weakening
	plas_refPlasStrain=0.3,0.3,0.3,0.5,0.3,0.3,0.01		#reference plastic strain from plastic weakening

# 2. Geometry, Ra numbers, Internal heating, Thermochemical/Purely thermal convection

#	Solver=cgrad node_assemble=1	 # conjugate gradient: unsure if it still works
	Solver=multigrid node_assemble=1 # multigrid iterative method

	rayleigh=3.908985e6	# Rayleigh number
	alpha_T=0.042		# product of dimensional alpha0 and deltaT, required to compute buoyancy

	composition=1		# Since tracers are needed for integration
				# This need always to be 1
	Q0=0			# Dimensionless internal heating rate
	Q0_enriched=0		# Q0 for C=1 layer, when relevant

	markers_per_ele=16	# number of particles per element
	comp_depth=0.0		# initial depth of compositional interface

	markers_sample_num=1	# total number of sampling points, currently maximum number allowed is 10
	sample_x=3.85		# x coordinates of sampling points
	sample_y=0.15		# y coordinates of sampling points
	sample_z=0.94	# z coordinates of sampling points

        compressibility=0.000000                #\rho_r (r) = exp[(1-r) * compressibility]
            relative_err_accuracy=0.01          # criteria for relative err of V and P
	    dyn_p_in_buoyancy=1                 # consider dynamic pressure in buoyancy? 0 = no, 1 =yes
        dissipation_number=0.000                # dissipation number

	#These two terms not working yet
	visc_heating=0		# 1: visc heating on; or 0: visc heating off.
	adi_heating=0		# 1: adiabatic heating on; or 0: adiabatic heating off.
	
# 3. Grid And Multiprocessor Information

	nprocx=8		# number of processors in x or theta dir	
	nprocy=8		# number of processors in y or fi dir
	nprocz=2		# number of processors in z or r dir

	nodex=33 nodez=33 nodey=33	# only relevant with conj-grad

	mgunitx=64	 	# multigrid base level in x or t 
	mgunity=64		# multigrid base level in y or f
	mgunitz=32		# multigrid base level in z or r
	levels=2		# and how many times(levels - 1) it gets doubled

# 4. Coordinate Information

	Geometry=cart3d 	# cart3d or Rsphere 
#	Geometry=Rsphere	# cart3d or Rsphere 

#CART:  irrelevant if Geometry=Rsphere.
	dimenx=4.5		# box size in x direction
	dimeny=4.5		# box size in y direction
	dimenz=1.0		# box size in z direction

	x_grid_layers=2
	xx=0,4.5
	nx=1,129

	y_grid_layers=2
	yy=0,4.5
	ny=1,129

	z_grid_layers=2		# minus 1 is number of layers with uniform grid in z.
	zz=0,1.0
	nz=1,65

#	zz=0.0,0.06,0.94,1.0	#    starting and ending z coodinates
#	nz=1,13,85,97		#    starting and ending node in z direction

        z_Dii=0.0348432                 # 100 km
	z_lmantle=0.76655052		# 2870 km-670 km
	z_410=0.857143			# 2870 km-410 km
	z_lith=0.9651568		# 2870-100 km


# Regional SPHERICAL: irrelevant if Geometry=cart3d

	radius_inner=0.55	radius_outer=1.0 	# inner and outer radius
	theta_north=65.0486 theta_south=114.9514	# colatitude in deg 
	fi_west=0		fi_east=55.266 		# longitude in deg

	r_grid_layers=6
	rr=0.55,0.56,0.58,0.88,0.99,1.0
	nr=1,4,8,38,62,65

	t_grid_layers=2
	tt=65.0486,114.9514
	nt=1,145

	f_grid_layers=2
	ff=0,55.266
	nf=1,129


        r_Dii=0.565149          # (Ro-2870 + 100km)/Ro
	r_lmantle=0.89482	# (Ro-670 km)/Ro
	r_410=0.9356358
	r_lith=0.984301		# (Ro-100 km)/Ro

# 5. Rheology


	rheol=2	# 0,1,2,... diff. option for diff. rheology. Check Visco....c
	TDEPV=on		# on/off for temperature-dependent viscosity

#	visc0=1.0e0,1.0e0,1.0e0,1.0e0	# pre-exponential constant
	visc0=1.0,1.0,1.0,1.0e4,1.0,1.0,1.0	# pre-exponential constant
#	viscE=0.0,0.0,0.0,0.0,0.0	#activation energy
#	viscE=0.0,15.22,15.22,15.22	#activation energy, 540000/8.31/1400/3.05
	viscE=13.2616,13.2616,13.2616,0.0,13.2616,13.2616,13.2616	
					#activation energy, 540000/8.31/1400/3.5

	viscT=273,273,273,273,273,273,273,273		#surface temperature: 
	viscZ=5e-6,5e-6,5e-6,5e-6,5e-6,5e-6,5e-6,5e-6	#activation volume


	SDEPV=on			# on/off for non-Newtonian
	sdepv_misfit=0.01		# accuracy for non-Newtonian iteration
#	sdepv_expt=1,3.05,3.05,3.5,1		# for each mat group, stress exponent
#	sdepv_expt=1,3.00,3.00,3.00,3.00		# for each mat group, stress exponent
	sdepv_expt=3.5,3.5,3.5,1.0,3.5,3.5,3.5		# for each mat group, stress exponent
#	sdepv_refsr=1.e0,122.5,122.5,360.e0,1.e0	# reference strain rate
	sdepv_refsr=435.6,435.6,435.6,1.0,435.6,435.6,435.6	# reference strain rate


	VMIN=on visc_min=1.0e00		# viscosity lower cutoff
	VMAX=on visc_max=1.0e04		# viscosity upper cutoff

	visc_smooth_cycles=1		# how viscosity is smoothed in multigrid
	Viscosity=system		# always  

# 6. DIMENSIONAL INFORMATION and Depth-dependence

	layerd=2870000.0 #meter
	radius=6370000.0
	ReferenceT=3800.0 
	refvisc=1.0e20
	density=3300.0
	thermdiff=1.0e-6
	gravacc=9.8
	thermexp=5e-5
	cp=1250
	wdensity=0.0

	visc_factor=1.0
	thermexp_factor=1.0
	thermdiff_factor=1.0
	surf_temp=0.195	#273/1400

# 7. phase changes: to turn off any of the phase changes, let Ra_XXX=0

	Ra_410=0.0 #kg/m^3
	Ra_670=0.0
	clapeyron410=3.0e6 #Pa K-1
	clapeyron670=-3.0e6

	width410=3.5e4 #meter
	width670=3.5e4


# 8. BOUNDARY CONDITIONS and Initial perturbations
	
	topvbc=0		# velocity boundary conditions top and bottom
		topvbxval=0.0
		topvbyval=0.0
	botvbc=0
		botvbxval=0.0
		botvbyval=0.0
					#
	toptbc=1 bottbc=1		# temperature bc's top and bottom
	toptbcval=0.0 bottbcval=1.0	#

	periodicx=off 		#
	periodicy=off		#
	flowthroughx=off	#
	flowthroughy=off	#

	num_perturbations=1	#  N, Number of perturbations
	perturbmag=0.001	#  A list of N magnitudes
	perturbk=1.0		#  A list of N wavenumbers (/PI)
	perturbl=6.0		#  A list of N wavenumbers (/PI)
	perturbm=0.0		#  A list of N wavenumbers (/PI)

# 8.1 arbitrary shape of boundary condition
	influx_markers=on			# adding particles for elements lack of them 

	Velocity_z_bc_rect=0                    # number of rectangular bc ranges (surfaces) (default=0)
        Velocity_z_bc_rect_norm=X,X,Y,X,Z,Z,Z,Z         # normal to plane of surface
        Velocity_z_bc_rect_icpt=3.0,8.0,2.0,0,0,0,0,0         # normal-axis intercept of bc plane
        Velocity_z_bc_rect_aa1=0.00,0.00,0.00,0.4,0.05,0.05,0.05,0.05    # lateral coordinate extent in 1st dimension
        Velocity_z_bc_rect_aa2=1.00,1.00,1.00,0.6,0.95,0.32,0.95,0.32
        Velocity_z_bc_rect_bb1=0.00,0.00,0.80,0.4,0.05,0.41,0.65,0.51     # lateral coordinate extent in 1st dimension
        Velocity_z_bc_rect_bb2=0.01,4.00,0.90,0.6,0.39,0.49,0.95,0.59
        Velocity_z_bc_rect_hw=0.01,0.01,0.01,0.01,0.02,0.02,0.02,0.02   # half-width of bc smoothing edge
        Velocity_z_bc_rect_mag=0.0,0.0,0.0,0.1,1.0,1.0,-1.0,-1.0        # magnitude of bc

	Velocity_y_bc_rect=0                    # number of rectangular bc ranges (surfaces) (default=0)
        Velocity_y_bc_rect_norm=X,X,Z,X,Z,Z,Z,Z         # normal to plane of surface
        Velocity_y_bc_rect_icpt=3.0,8.0,0.0,0,0,0,0,0         # normal-axis intercept of bc plane
        Velocity_y_bc_rect_aa1=0.00,0.0,0.00,0.4,0.05,0.05,0.05,0.05    # lateral coordinate extent in 1st dimension
        Velocity_y_bc_rect_aa2=1.00,1.0,4.00,0.6,0.95,0.32,0.95,0.32
        Velocity_y_bc_rect_bb1=0.00,0.00,0.00,0.4,0.05,0.41,0.65,0.51     # lateral coordinate extent in 1st dimension
        Velocity_y_bc_rect_bb2=0.01,4.00,8.00,0.6,0.39,0.49,0.95,0.59
        Velocity_y_bc_rect_hw=0.01,0.01,0.01,0.01,0.02,0.02,0.02,0.02   # half-width of bc smoothing edge
        Velocity_y_bc_rect_mag=0.0,0.0,0.0,0.1,1.0,1.0,-1.0,-1.0        # magnitude of bc

	Velocity_x_bc_rect=0                    # number of rectangular bc ranges (surfaces) (default=0)
        Velocity_x_bc_rect_norm=Z,Z,Y,Y,Z,Z,Z,Z         # normal to plane of surface
        Velocity_x_bc_rect_icpt=0.96,0.96,0.0,0.01,0,0,0,0         # normal-axis intercept of bc plane
        Velocity_x_bc_rect_aa1=0.00,0.00,0.00,0.00,0.05,0.05,0.05,0.05    # lateral coordinate extent in 1st dimension
        Velocity_x_bc_rect_aa2=3.00,3.00,1.00,1.00,0.95,0.32,0.95,0.32
        Velocity_x_bc_rect_bb1=0.1,1.7,0.00,0.00,0.05,0.41,0.65,0.51     # lateral coordinate extent in 1st dimension
        Velocity_x_bc_rect_bb2=0.8,2.9,4.00,4.00,0.39,0.49,0.95,0.59
        Velocity_x_bc_rect_hw=0.01,0.01,-3.0,-3.0,0.02,0.02,0.02,0.02   # half-width of bc smoothing edge
        Velocity_x_bc_rect_mag=1267.52,-1584.4,634.2,634.2,1.0,1.0,-1.0,-1.0        # magnitude of bc

	Stress_x_bc_rect=0                    # number of rectangular bc ranges (surfaces) (default=0)
        Stress_x_bc_rect_norm=X,X,X,X,Z,Z,Z,Z         # normal to plane of surface
        Stress_x_bc_rect_icpt=0.0,8.0,2.0,0,0,0,0,0         # normal-axis intercept of bc plane
        Stress_x_bc_rect_aa1=0.0,0.0,0.90,0.4,0.05,0.05,0.05,0.05    # lateral coordinate extent in 1st dimension
        Stress_x_bc_rect_aa2=1.0,1.0,1.00,0.6,0.95,0.32,0.95,0.32
        Stress_x_bc_rect_bb1=0.0,0.0,0.00,0.4,0.05,0.41,0.65,0.51     # lateral coordinate extent in 1st dimension
        Stress_x_bc_rect_bb2=4.0,4.0,0.01,0.6,0.39,0.49,0.95,0.59
        Stress_x_bc_rect_hw=0.01,0.01,0.01,0.01,0.02,0.02,0.02,0.02   # half-width of bc smoothing edge
        Stress_x_bc_rect_mag=0.0,0.0,0.0,0.1,1.0,1.0,-1.0,-1.0        # magnitude of bc
	
	Stress_y_bc_rect=0                    # number of rectangular bc ranges (surfaces) (default=0)
        Stress_y_bc_rect_norm=Y,X,X,X,Z,Z,Z,Z         # normal to plane of surface
        Stress_y_bc_rect_icpt=4.0,8.0,2.0,0,0,0,0,0         # normal-axis intercept of bc plane
        Stress_y_bc_rect_aa1=0.0,0.0,0.90,0.4,0.05,0.05,0.05,0.05    # lateral coordinate extent in 1st dimension
        Stress_y_bc_rect_aa2=8.0,1.0,1.00,0.6,0.95,0.32,0.95,0.32
        Stress_y_bc_rect_bb1=0.0,0.0,0.00,0.4,0.05,0.41,0.65,0.51     # lateral coordinate extent in 1st dimension
        Stress_y_bc_rect_bb2=1.0,4.0,0.01,0.6,0.39,0.49,0.95,0.59
        Stress_y_bc_rect_hw=0.01,0.01,0.01,0.01,0.02,0.02,0.02,0.02   # half-width of bc smoothing edge
        Stress_y_bc_rect_mag=0.0,0.0,0.0,0.1,1.0,1.0,-1.0,-1.0        # magnitude of bc
	
	Stress_z_bc_rect=0                    # number of rectangular bc ranges (surfaces) (default=0)
        Stress_z_bc_rect_norm=Z,X,X,X,Z,Z,Z,Z         # normal to plane of surface
        Stress_z_bc_rect_icpt=0.0,8.0,2.0,0,0,0,0,0         # normal-axis intercept of bc plane
        Stress_z_bc_rect_aa1=0.0,0.0,0.90,0.4,0.05,0.05,0.05,0.05    # lateral coordinate extent in 1st dimension
        Stress_z_bc_rect_aa2=4.0,1.0,1.00,0.6,0.95,0.32,0.95,0.32
        Stress_z_bc_rect_bb1=0.0,0.0,0.00,0.4,0.05,0.41,0.65,0.51     # lateral coordinate extent in 1st dimension
        Stress_z_bc_rect_bb2=8.0,4.0,0.01,0.6,0.39,0.49,0.95,0.59
        Stress_z_bc_rect_hw=0.01,0.01,0.01,0.01,0.02,0.02,0.02,0.02   # half-width of bc smoothing edge
        Stress_z_bc_rect_mag=0.0,0.0,0.0,0.1,1.0,1.0,-1.0,-1.0        # magnitude of bc


	Temp_bc_rect=0                    # number of rectangular bc ranges (surfaces) (default=0)
        Temp_bc_rect_norm=X,X,X,X,Z,Z,Z,Z         # normal to plane of surface
        Temp_bc_rect_icpt=0.0,8.0,2.0,0,0,0,0,0         # normal-axis intercept of bc plane
        Temp_bc_rect_aa1=0.0,0.0,0.90,0.4,0.05,0.05,0.05,0.05    # lateral coordinate extent in 1st dimension
        Temp_bc_rect_aa2=1.0,1.0,1.00,0.6,0.95,0.32,0.95,0.32
        Temp_bc_rect_bb1=0.0,0.0,0.00,0.4,0.05,0.41,0.65,0.51     # lateral coordinate extent in 1st dimension
        Temp_bc_rect_bb2=4.0,4.0,0.01,0.6,0.39,0.49,0.95,0.59
        Temp_bc_rect_hw=-10.0,0.01,0.01,0.01,0.02,0.02,0.02,0.02   # half-width of bc smoothing edge
        Temp_bc_rect_mag=0.0157679,0.0,0.0,0.1,1.0,1.0,-1.0,-1.0        # magnitude of bc
			#80Ma

	Temp_bc_circ=0                    # number of circular bc ranges (surfaces) (default=0)
        Temp_bc_circ_norm=Z,X,X,X,Z,Z,Z,Z         # normal to plane of surface
        Temp_bc_circ_icpt=0.0,6.0,0,0,0,0,0,0         # normal-axis intercept of bc plane
        Temp_bc_circ_aa=0.0,0.5,0.00,0.4,0.05,0.05,0.05,0.05    # coordinate of the circle center
        Temp_bc_circ_bb=2.0,1.0,0.00,0.6,0.95,0.32,0.95,0.32
        Temp_bc_circ_rad=0.1875,2.0,0.00,0.6,0.39,0.49,0.95,0.59    # circle radius
        Temp_bc_circ_hw=-20.0,0.01,0.01,0.01,0.02,0.02,0.02,0.02   # half-width of bc smoothing edge
        Temp_bc_circ_mag=1.2143,0.0,0.5,0.1,1.0,1.0,-1.0,-1.0        # magnitude of bc

	


# 9. SOLVER RELATED MATTERS

	Problem=convection	# always, almost
	aug_lagr=on
	aug_number=2.0e0
	precond=on
	orthogonal=off

	maxsub=1

        compress_iter_maxstep=100           # max iteration step for compressibility

	viterations=2		# Uzawa iteration loops.
	mg_cycle=1		# 1 = V cycle, 2 = W cycle, and so on.
	down_heavy=3		# Increase downward smoothing by this factor.
	up_heavy=3		# Increase upward smoothing by this factor.
	vlowstep=20		# Enough to get very  accurate soln at low level.
	vhighstep=3		# Smoothing passes at highest level (finest grid).

	piterations=375		# Uzawa iteration loops.
	accuracy=1.0e-2		# Desired accuracy of Uzawa algorithm. 
	tole_compressibility=1e-7

# Tuning of energy equation

	adv_sub_iterations=2
	finetunedt=0.75

	ll_max=20
	nlong=180
	nlati=90

# Data input and program debugging

	DESCRIBE=off		# 
	BEGINNER=off		#
	VERBOSE=off		#
	verbose=off		#
	COMPRESS=off		#
	see_convergence=1

# vim:ts=8:sw=8
