#------------------[User Input]--------------------------------

# Prefix of model files to be generated.
SUTRA_Model_prefix = 'SUTRA_UTES'
#common_input_files = 'common_input_files'
energy_model_inputCSVfile = 'chicago_inputs.csv'

# If the system is being run to provide cooling water, then this is True.  Else it is assumed heating water is stored.
try2Cool = True

#---------Simulation Duration and Heat Addition/Extraction----------

# Use cyclic operational mode if this is true.  Else, use continuous mode.
useCyclic = True

#Number of years to run the simulation.
sim_length = 30.0

# This version utlizes a constant temperature differential at the heat exchanger [degC]. Tout_hx = Tin_hx + deltaT_hx
deltaT_hx = 10.0

# Threshold temperature for heat extraction [degC]. This is the maximum/minimum operational temperature for the heat exchanger for cooling/heating. 
# If no threshold is needed, set this to 100.0.
T_hx = 23.9

# Ambient temperature threshold [degC]. For cooling, if the ambient temperature exceeds this value, production occurs.
# If ambient temperature is below the value, recharge occurs.
T_ambient_threshold = -8.92
T_ambient_storage_threshold = -8.92

#---------Fluid properties for SUTRA----------

# Density (kg/m3) and viscosity (kg/(sec*m)) of water at 10C in kg/m3
rho_water = 999.700
mu_water = 0.0013077
reference_water_T = 10.0

# Fluid compressibility in units of m*s2/kg.
COMPFL = 4.47e-10

# specific heat capacity of water in J/kg/C (Ws/kg/C)
specHeat_water = 4181.3
CW = specHeat_water

# Thermal conductivity of water for heat transport J/(m*C*sec).  
SIGMAW = 0.6

# Thermal conductivity of Air for heat transport J/(m*C*sec).  
SIGMAA = 0.03

# Acceleration due to gravity in m/s2
g = 9.80665

# If this flag is true, simulate water density and viscosity as T dependent.
flow_is_T_dependent = True

#---------Solid properties for SUTRA----------

# This file is read to define spatially variable properties of the layers.
# The well screen interval is centered on zero, and all elevations are relative to this elevation.
layer_info_file = r'layer_properties.csv'

# SUTRA only allows prescribing a single density and compressibility of solid material. 
# Bulk compressibility of solid phase in units of m*s2/kg (SUTRA does not let this vary in space).
COMPMA = 2.0e-11

# Density of solid phase in units of kg/m3 (SUTRA does not let this vary in space).
RHOS = 2640

#---------Well properties--------------
# For current model (for flxEnabler) only well_spacing is used in this section
# Space between wells in doublet 
well_spacing = 55

# Diameter of the open hole within the casing in meters.
well_diameter = 0.2

# Maximum and minimum rates that the pump can sustain from the reservoir in gpm.
# Maximum rate that the pump can sustain from the reservoir in gpm. If maximum heat injection 
# pumping rate is higher than this value, this limit will be reset to the max injection rate.

max_pump_rate_gpm = 2000
# Good guess is 20% of max.
min_pump_rate_gpm = 400
useMinPumpRate = False

#---------Initial conditions----------

# Fixed T at the upper boundary.
T_upper_C = 15.2
 
# Estimated heat flow at lower boundary (W/m2)
HeatFlow_Wm2 = 0.059

# Prescribe pressure at the uppermost centerline node so that the solution is well-constrained.
# If only fluxes are prescribed, then there are an infinite number of pressure distributions
# that solve the equations. Fluxes are read from the layer_info_file.

# Because model layer inputs for depth are relative to sea level, the head at the upper boundary 
# needs to be defined to compute the pressure boundary condition value.
prescribed_head_m_ASL = 55.0 

# This is now recalculated based on sea level elevation = 0 in wrapper.
P_val = 0.0 #(float(prescribed_head_m_ASL) - float(elevation_wellscreen_midpoint_m_ASL)) * float(m2Pa_conversion)

#Uniform initial pressure distribution used for steady flow simulation.  Output from this 
#simulation is used as input to the transient simulation.
P_initial = P_val


#---------Stress Period Parameters----------

# Approximate desired length of stress periods in days.
target_stressPeriods_d = 7

# If you don't want a shorter last stress period, add the remainder onto the previous stress period by setting this to True.
lump_last_SP = True

#---------File Output Flags----------

# If you want to keep the output files for each stress period, make the following True.  Because the .nod file is big,
# it will not be automatically be written, unless you also make keepNodFiles = True.
keepOutputFiles = True
keepNodFiles = True
keepPumpingFiles = True
keepSolutionScheduleFiles = True








#-------------------------------------------------------------------------------------------------------
#       ------Legacy Terms--------------
# This section contains terms for earlier versions or other operations. Please do not remove or modify.

#Fraction of total building heat load to inject annually.  The heat source "pattern" information will be scaled to add this amount of heat.
#For example, a value of 1.25 ensures that 125% of the heat needed will be injected, allowing for heat loss.
heat_inj_frac = 1.25

#Number of years to heat/cool the RTES system before using for building heating and cooling.
chargeup_period = 0.0

#Annual heat for heating/cooling in GWh. 
heatDemand_annual = 0.3244*20

# Thickness (meters) of construction material that will insulate well from surrounding geology. 
well_insulation_thickness = 0.0 #0.15

# Thermal conductivity (W/m/C) of construction material that will insulate well from surrounding geology.
insulation_thermCond = 0.55

# Specific heat capacity (J/kg/C) of construction material that will insulate well from surrounding geology.
insulation_specHeat = 750

## Head above sea level in meters.
#prescribed_head_m_ASL = 50.0

## Elevation of midpoint of screen relative to sea level in meters. 
#elevation_wellscreen_midpoint_m_ASL = -110.0

# Compute pressure from head assuming the following meters of water to Pa conversion.
m2Pa_conversion = 9807

# Thickness (meters) of construction material that will insulate well from surrounding geology. 
well_insulation_thickness = 0.0 #0.15

# Thermal conductivity (W/m/C) of construction material that will insulate well from surrounding geology.
insulation_thermCond = 0.55

# Specific heat capacity (J/kg/C) of construction material that will insulate well from surrounding geology.
insulation_specHeat = 750

# Minimum differential of return flow to subsurface for heat exchange in Celsius.
HX_Tdiff_min_C = 2

heat_addition_inputCSVfile = 'Solar_Supply.csv'
cool_addition_inputCSVfile = 'cool_supply.csv'

heat_addition_T_C = 35
cool_addition_T_C = 4

# Injection temperature during the storage phase in C.
T_stor = 4.0

#A value of True uses the heat_inj_frac only during the storage injection cycle, and False increases the all stress periods by this fraction. 
onlyIncreaseInjection = True

#------------------[End User Input]--------------------------------