repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
AguaClara/aguaclara
aguaclara/core/head_loss.py
_k_value_square_reduction
def _k_value_square_reduction(ent_pipe_id, exit_pipe_id, re, f): """Returns the minor loss coefficient for a square reducer. Parameters: ent_pipe_id: Entrance pipe's inner diameter. exit_pipe_id: Exit pipe's inner diameter. re: Reynold's number. f: Darcy friction factor. """...
python
def _k_value_square_reduction(ent_pipe_id, exit_pipe_id, re, f): """Returns the minor loss coefficient for a square reducer. Parameters: ent_pipe_id: Entrance pipe's inner diameter. exit_pipe_id: Exit pipe's inner diameter. re: Reynold's number. f: Darcy friction factor. """...
[ "def", "_k_value_square_reduction", "(", "ent_pipe_id", ",", "exit_pipe_id", ",", "re", ",", "f", ")", ":", "if", "re", "<", "2500", ":", "return", "(", "1.2", "+", "(", "160", "/", "re", ")", ")", "*", "(", "(", "ent_pipe_id", "/", "exit_pipe_id", "...
Returns the minor loss coefficient for a square reducer. Parameters: ent_pipe_id: Entrance pipe's inner diameter. exit_pipe_id: Exit pipe's inner diameter. re: Reynold's number. f: Darcy friction factor.
[ "Returns", "the", "minor", "loss", "coefficient", "for", "a", "square", "reducer", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/head_loss.py#L158-L172
AguaClara/aguaclara
aguaclara/core/head_loss.py
_k_value_tapered_reduction
def _k_value_tapered_reduction(ent_pipe_id, exit_pipe_id, fitting_angle, re, f): """Returns the minor loss coefficient for a tapered reducer. Parameters: ent_pipe_id: Entrance pipe's inner diameter. exit_pipe_id: Exit pipe's inner diameter. fitting_angle: Fitting angle between entrance ...
python
def _k_value_tapered_reduction(ent_pipe_id, exit_pipe_id, fitting_angle, re, f): """Returns the minor loss coefficient for a tapered reducer. Parameters: ent_pipe_id: Entrance pipe's inner diameter. exit_pipe_id: Exit pipe's inner diameter. fitting_angle: Fitting angle between entrance ...
[ "def", "_k_value_tapered_reduction", "(", "ent_pipe_id", ",", "exit_pipe_id", ",", "fitting_angle", ",", "re", ",", "f", ")", ":", "k_value_square_reduction", "=", "_k_value_square_reduction", "(", "ent_pipe_id", ",", "exit_pipe_id", ",", "re", ",", "f", ")", "if"...
Returns the minor loss coefficient for a tapered reducer. Parameters: ent_pipe_id: Entrance pipe's inner diameter. exit_pipe_id: Exit pipe's inner diameter. fitting_angle: Fitting angle between entrance and exit pipes. re: Reynold's number. f: Darcy friction factor.
[ "Returns", "the", "minor", "loss", "coefficient", "for", "a", "tapered", "reducer", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/head_loss.py#L175-L195
AguaClara/aguaclara
aguaclara/unit_process_design/ent_tank.py
drain_OD
def drain_OD(q_plant, T, depth_end, SDR): """Return the nominal diameter of the entrance tank drain pipe. Depth at the end of the flocculator is used for headloss and length calculation inputs in the diam_pipe calculation. Parameters ---------- q_plant: float Plant flow rate T: flo...
python
def drain_OD(q_plant, T, depth_end, SDR): """Return the nominal diameter of the entrance tank drain pipe. Depth at the end of the flocculator is used for headloss and length calculation inputs in the diam_pipe calculation. Parameters ---------- q_plant: float Plant flow rate T: flo...
[ "def", "drain_OD", "(", "q_plant", ",", "T", ",", "depth_end", ",", "SDR", ")", ":", "nu", "=", "pc", ".", "viscosity_kinematic", "(", "T", ")", "K_minor", "=", "con", ".", "PIPE_ENTRANCE_K_MINOR", "+", "con", ".", "PIPE_EXIT_K_MINOR", "+", "con", ".", ...
Return the nominal diameter of the entrance tank drain pipe. Depth at the end of the flocculator is used for headloss and length calculation inputs in the diam_pipe calculation. Parameters ---------- q_plant: float Plant flow rate T: float Design temperature depth_end: flo...
[ "Return", "the", "nominal", "diameter", "of", "the", "entrance", "tank", "drain", "pipe", ".", "Depth", "at", "the", "end", "of", "the", "flocculator", "is", "used", "for", "headloss", "and", "length", "calculation", "inputs", "in", "the", "diam_pipe", "calc...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/unit_process_design/ent_tank.py#L9-L42
AguaClara/aguaclara
aguaclara/unit_process_design/ent_tank.py
num_plates_ET
def num_plates_ET(q_plant, W_chan): """Return the number of plates in the entrance tank. This number minimizes the total length of the plate settler unit. Parameters ---------- q_plant: float Plant flow rate W_chan: float Width of channel Returns ------- float ...
python
def num_plates_ET(q_plant, W_chan): """Return the number of plates in the entrance tank. This number minimizes the total length of the plate settler unit. Parameters ---------- q_plant: float Plant flow rate W_chan: float Width of channel Returns ------- float ...
[ "def", "num_plates_ET", "(", "q_plant", ",", "W_chan", ")", ":", "num_plates", "=", "np", ".", "ceil", "(", "np", ".", "sqrt", "(", "q_plant", "/", "(", "design", ".", "ent_tank", ".", "CENTER_PLATE_DIST", ".", "magnitude", "*", "W_chan", "*", "design", ...
Return the number of plates in the entrance tank. This number minimizes the total length of the plate settler unit. Parameters ---------- q_plant: float Plant flow rate W_chan: float Width of channel Returns ------- float ? Examples -------- >>> f...
[ "Return", "the", "number", "of", "plates", "in", "the", "entrance", "tank", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/unit_process_design/ent_tank.py#L45-L72
AguaClara/aguaclara
aguaclara/unit_process_design/ent_tank.py
L_plate_ET
def L_plate_ET(q_plant, W_chan): """Return the length of the plates in the entrance tank. Parameters ---------- q_plant: float Plant flow rate W_chan: float Width of channel Returns ------- float ? Examples -------- >>> from aguaclara.play import* ...
python
def L_plate_ET(q_plant, W_chan): """Return the length of the plates in the entrance tank. Parameters ---------- q_plant: float Plant flow rate W_chan: float Width of channel Returns ------- float ? Examples -------- >>> from aguaclara.play import* ...
[ "def", "L_plate_ET", "(", "q_plant", ",", "W_chan", ")", ":", "L_plate", "=", "(", "q_plant", "/", "(", "num_plates_ET", "(", "q_plant", ",", "W_chan", ")", "*", "W_chan", "*", "design", ".", "ent_tank", ".", "CAPTURE_BOD_VEL", ".", "magnitude", "*", "np...
Return the length of the plates in the entrance tank. Parameters ---------- q_plant: float Plant flow rate W_chan: float Width of channel Returns ------- float ? Examples -------- >>> from aguaclara.play import* >>> L_plate_ET(20*u.L/u.s,2*u.m) ...
[ "Return", "the", "length", "of", "the", "plates", "in", "the", "entrance", "tank", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/unit_process_design/ent_tank.py#L75-L101
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
alpha0_carbonate
def alpha0_carbonate(pH): """Calculate the fraction of total carbonates in carbonic acid form (H2CO3) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in carbonic acid form (H2CO3) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_ana...
python
def alpha0_carbonate(pH): """Calculate the fraction of total carbonates in carbonic acid form (H2CO3) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in carbonic acid form (H2CO3) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_ana...
[ "def", "alpha0_carbonate", "(", "pH", ")", ":", "alpha0_carbonate", "=", "1", "/", "(", "1", "+", "(", "K1_carbonate", "/", "invpH", "(", "pH", ")", ")", "*", "(", "1", "+", "(", "K2_carbonate", "/", "invpH", "(", "pH", ")", ")", ")", ")", "retur...
Calculate the fraction of total carbonates in carbonic acid form (H2CO3) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in carbonic acid form (H2CO3) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_analysis import alpha0_carbonate ...
[ "Calculate", "the", "fraction", "of", "total", "carbonates", "in", "carbonic", "acid", "form", "(", "H2CO3", ")" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L38-L55
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
alpha1_carbonate
def alpha1_carbonate(pH): """Calculate the fraction of total carbonates in bicarbonate form (HCO3-) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in bicarbonate form (HCO3-) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_analysi...
python
def alpha1_carbonate(pH): """Calculate the fraction of total carbonates in bicarbonate form (HCO3-) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in bicarbonate form (HCO3-) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_analysi...
[ "def", "alpha1_carbonate", "(", "pH", ")", ":", "alpha1_carbonate", "=", "1", "/", "(", "(", "invpH", "(", "pH", ")", "/", "K1_carbonate", ")", "+", "1", "+", "(", "K2_carbonate", "/", "invpH", "(", "pH", ")", ")", ")", "return", "alpha1_carbonate" ]
Calculate the fraction of total carbonates in bicarbonate form (HCO3-) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in bicarbonate form (HCO3-) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_analysis import alpha1_carbonate >>>...
[ "Calculate", "the", "fraction", "of", "total", "carbonates", "in", "bicarbonate", "form", "(", "HCO3", "-", ")" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L58-L75
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
alpha2_carbonate
def alpha2_carbonate(pH): """Calculate the fraction of total carbonates in carbonate form (CO3-2) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in carbonate form (CO3-2) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_analysis im...
python
def alpha2_carbonate(pH): """Calculate the fraction of total carbonates in carbonate form (CO3-2) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in carbonate form (CO3-2) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_analysis im...
[ "def", "alpha2_carbonate", "(", "pH", ")", ":", "alpha2_carbonate", "=", "1", "/", "(", "1", "+", "(", "invpH", "(", "pH", ")", "/", "K2_carbonate", ")", "*", "(", "1", "+", "(", "invpH", "(", "pH", ")", "/", "K1_carbonate", ")", ")", ")", "retur...
Calculate the fraction of total carbonates in carbonate form (CO3-2) :param pH: pH of the system :type pH: float :return: Fraction of carbonates in carbonate form (CO3-2) :rtype: float :Examples: >>> from aguaclara.research.environmental_processes_analysis import alpha2_carbonate >>> rou...
[ "Calculate", "the", "fraction", "of", "total", "carbonates", "in", "carbonate", "form", "(", "CO3", "-", "2", ")" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L78-L95
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
ANC_closed
def ANC_closed(pH, total_carbonates): """Calculate the acid neutralizing capacity (ANC) under a closed system in which no carbonates are exchanged with the atmosphere during the experiment. Based on pH and total carbonates in the system. :param pH: pH of the system :type pH: float :param total_...
python
def ANC_closed(pH, total_carbonates): """Calculate the acid neutralizing capacity (ANC) under a closed system in which no carbonates are exchanged with the atmosphere during the experiment. Based on pH and total carbonates in the system. :param pH: pH of the system :type pH: float :param total_...
[ "def", "ANC_closed", "(", "pH", ",", "total_carbonates", ")", ":", "return", "(", "total_carbonates", "*", "(", "u", ".", "eq", "/", "u", ".", "mol", "*", "alpha1_carbonate", "(", "pH", ")", "+", "2", "*", "u", ".", "eq", "/", "u", ".", "mol", "*...
Calculate the acid neutralizing capacity (ANC) under a closed system in which no carbonates are exchanged with the atmosphere during the experiment. Based on pH and total carbonates in the system. :param pH: pH of the system :type pH: float :param total_carbonates: Total carbonate concentration in ...
[ "Calculate", "the", "acid", "neutralizing", "capacity", "(", "ANC", ")", "under", "a", "closed", "system", "in", "which", "no", "carbonates", "are", "exchanged", "with", "the", "atmosphere", "during", "the", "experiment", ".", "Based", "on", "pH", "and", "to...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L98-L120
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
aeration_data
def aeration_data(DO_column, dirpath): """Extract the data from folder containing tab delimited files of aeration data. The file must be the original tab delimited file. All text strings below the header must be removed from these files. The file names must be the air flow rates with units of micromoles...
python
def aeration_data(DO_column, dirpath): """Extract the data from folder containing tab delimited files of aeration data. The file must be the original tab delimited file. All text strings below the header must be removed from these files. The file names must be the air flow rates with units of micromoles...
[ "def", "aeration_data", "(", "DO_column", ",", "dirpath", ")", ":", "#return the list of files in the directory", "filenames", "=", "os", ".", "listdir", "(", "dirpath", ")", "#extract the flowrates from the filenames and apply units", "airflows", "=", "(", "(", "np", "...
Extract the data from folder containing tab delimited files of aeration data. The file must be the original tab delimited file. All text strings below the header must be removed from these files. The file names must be the air flow rates with units of micromoles/s. An example file name would be "300.xls...
[ "Extract", "the", "data", "from", "folder", "containing", "tab", "delimited", "files", "of", "aeration", "data", ".", "The", "file", "must", "be", "the", "original", "tab", "delimited", "file", ".", "All", "text", "strings", "below", "the", "header", "must",...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L142-L179
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
O2_sat
def O2_sat(P_air, temp): """Calculate saturaed oxygen concentration in mg/L for 278 K < T < 318 K :param P_air: Air pressure with appropriate units :type P_air: float :param temp: Water temperature with appropriate units :type temp: float :return: Saturated oxygen concentration in mg/L :rt...
python
def O2_sat(P_air, temp): """Calculate saturaed oxygen concentration in mg/L for 278 K < T < 318 K :param P_air: Air pressure with appropriate units :type P_air: float :param temp: Water temperature with appropriate units :type temp: float :return: Saturated oxygen concentration in mg/L :rt...
[ "def", "O2_sat", "(", "P_air", ",", "temp", ")", ":", "fraction_O2", "=", "0.21", "P_O2", "=", "P_air", "*", "fraction_O2", "return", "(", "(", "P_O2", ".", "to", "(", "u", ".", "atm", ")", ".", "magnitude", ")", "*", "u", ".", "mg", "/", "u", ...
Calculate saturaed oxygen concentration in mg/L for 278 K < T < 318 K :param P_air: Air pressure with appropriate units :type P_air: float :param temp: Water temperature with appropriate units :type temp: float :return: Saturated oxygen concentration in mg/L :rtype: float :Examples: ...
[ "Calculate", "saturaed", "oxygen", "concentration", "in", "mg", "/", "L", "for", "278", "K", "<", "T", "<", "318", "K" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L182-L203
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
Gran
def Gran(data_file_path): """Extract the data from a ProCoDA Gran plot file. The file must be the original tab delimited file. :param data_file_path: The path to the file. If the file is in the working directory, then the file name is sufficient. :return: collection of * **V_titrant** (*float*) -...
python
def Gran(data_file_path): """Extract the data from a ProCoDA Gran plot file. The file must be the original tab delimited file. :param data_file_path: The path to the file. If the file is in the working directory, then the file name is sufficient. :return: collection of * **V_titrant** (*float*) -...
[ "def", "Gran", "(", "data_file_path", ")", ":", "df", "=", "pd", ".", "read_csv", "(", "data_file_path", ",", "delimiter", "=", "'\\t'", ",", "header", "=", "5", ")", "V_t", "=", "np", ".", "array", "(", "pd", ".", "to_numeric", "(", "df", ".", "il...
Extract the data from a ProCoDA Gran plot file. The file must be the original tab delimited file. :param data_file_path: The path to the file. If the file is in the working directory, then the file name is sufficient. :return: collection of * **V_titrant** (*float*) - Volume of titrant in mL ...
[ "Extract", "the", "data", "from", "a", "ProCoDA", "Gran", "plot", "file", ".", "The", "file", "must", "be", "the", "original", "tab", "delimited", "file", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L206-L232
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
CMFR
def CMFR(t, C_initial, C_influent): """Calculate the effluent concentration of a conversative (non-reacting) material with continuous input to a completely mixed flow reactor. Note: time t=0 is the time at which the material starts to flow into the reactor. :param C_initial: The concentration in t...
python
def CMFR(t, C_initial, C_influent): """Calculate the effluent concentration of a conversative (non-reacting) material with continuous input to a completely mixed flow reactor. Note: time t=0 is the time at which the material starts to flow into the reactor. :param C_initial: The concentration in t...
[ "def", "CMFR", "(", "t", ",", "C_initial", ",", "C_influent", ")", ":", "return", "C_influent", "*", "(", "1", "-", "np", ".", "exp", "(", "-", "t", ")", ")", "+", "C_initial", "*", "np", ".", "exp", "(", "-", "t", ")" ]
Calculate the effluent concentration of a conversative (non-reacting) material with continuous input to a completely mixed flow reactor. Note: time t=0 is the time at which the material starts to flow into the reactor. :param C_initial: The concentration in the CMFR at time t=0. :type C_initial: f...
[ "Calculate", "the", "effluent", "concentration", "of", "a", "conversative", "(", "non", "-", "reacting", ")", "material", "with", "continuous", "input", "to", "a", "completely", "mixed", "flow", "reactor", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L237-L263
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
E_CMFR_N
def E_CMFR_N(t, N): """Calculate a dimensionless measure of the output tracer concentration from a spike input to a series of completely mixed flow reactors. :param t: The time(s) at which to calculate the effluent concentration. Time can be made dimensionless by dividing by the residence time of the CMFR....
python
def E_CMFR_N(t, N): """Calculate a dimensionless measure of the output tracer concentration from a spike input to a series of completely mixed flow reactors. :param t: The time(s) at which to calculate the effluent concentration. Time can be made dimensionless by dividing by the residence time of the CMFR....
[ "def", "E_CMFR_N", "(", "t", ",", "N", ")", ":", "return", "(", "N", "**", "N", ")", "/", "special", ".", "gamma", "(", "N", ")", "*", "(", "t", "**", "(", "N", "-", "1", ")", ")", "*", "np", ".", "exp", "(", "-", "N", "*", "t", ")" ]
Calculate a dimensionless measure of the output tracer concentration from a spike input to a series of completely mixed flow reactors. :param t: The time(s) at which to calculate the effluent concentration. Time can be made dimensionless by dividing by the residence time of the CMFR. :type t: float or nump...
[ "Calculate", "a", "dimensionless", "measure", "of", "the", "output", "tracer", "concentration", "from", "a", "spike", "input", "to", "a", "series", "of", "completely", "mixed", "flow", "reactors", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L266-L286
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
E_Advective_Dispersion
def E_Advective_Dispersion(t, Pe): """Calculate a dimensionless measure of the output tracer concentration from a spike input to reactor with advection and dispersion. :param t: The time(s) at which to calculate the effluent concentration. Time can be made dimensionless by dividing by the residence time of...
python
def E_Advective_Dispersion(t, Pe): """Calculate a dimensionless measure of the output tracer concentration from a spike input to reactor with advection and dispersion. :param t: The time(s) at which to calculate the effluent concentration. Time can be made dimensionless by dividing by the residence time of...
[ "def", "E_Advective_Dispersion", "(", "t", ",", "Pe", ")", ":", "# replace any times at zero with a number VERY close to zero to avoid", "# divide by zero errors", "if", "isinstance", "(", "t", ",", "list", ")", ":", "t", "[", "t", "==", "0", "]", "=", "10", "**",...
Calculate a dimensionless measure of the output tracer concentration from a spike input to reactor with advection and dispersion. :param t: The time(s) at which to calculate the effluent concentration. Time can be made dimensionless by dividing by the residence time of the CMFR. :type t: float or numpy.arr...
[ "Calculate", "a", "dimensionless", "measure", "of", "the", "output", "tracer", "concentration", "from", "a", "spike", "input", "to", "reactor", "with", "advection", "and", "dispersion", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L289-L311
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
Tracer_CMFR_N
def Tracer_CMFR_N(t_seconds, t_bar, C_bar, N): """Used by Solver_CMFR_N. All inputs and outputs are unitless. This is The model function, f(x, ...). It takes the independent variable as the first argument and the parameters to fit as separate remaining arguments. :param t_seconds: List of times :ty...
python
def Tracer_CMFR_N(t_seconds, t_bar, C_bar, N): """Used by Solver_CMFR_N. All inputs and outputs are unitless. This is The model function, f(x, ...). It takes the independent variable as the first argument and the parameters to fit as separate remaining arguments. :param t_seconds: List of times :ty...
[ "def", "Tracer_CMFR_N", "(", "t_seconds", ",", "t_bar", ",", "C_bar", ",", "N", ")", ":", "return", "C_bar", "*", "E_CMFR_N", "(", "t_seconds", "/", "t_bar", ",", "N", ")" ]
Used by Solver_CMFR_N. All inputs and outputs are unitless. This is The model function, f(x, ...). It takes the independent variable as the first argument and the parameters to fit as separate remaining arguments. :param t_seconds: List of times :type t_seconds: float list :param t_bar: Average tim...
[ "Used", "by", "Solver_CMFR_N", ".", "All", "inputs", "and", "outputs", "are", "unitless", ".", "This", "is", "The", "model", "function", "f", "(", "x", "...", ")", ".", "It", "takes", "the", "independent", "variable", "as", "the", "first", "argument", "a...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L314-L338
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
Solver_CMFR_N
def Solver_CMFR_N(t_data, C_data, theta_guess, C_bar_guess): """Use non-linear least squares to fit the function Tracer_CMFR_N(t_seconds, t_bar, C_bar, N) to reactor data. :param t_data: Array of times with units :type t_data: float list :param C_data: Array of tracer concentration data with units ...
python
def Solver_CMFR_N(t_data, C_data, theta_guess, C_bar_guess): """Use non-linear least squares to fit the function Tracer_CMFR_N(t_seconds, t_bar, C_bar, N) to reactor data. :param t_data: Array of times with units :type t_data: float list :param C_data: Array of tracer concentration data with units ...
[ "def", "Solver_CMFR_N", "(", "t_data", ",", "C_data", ",", "theta_guess", ",", "C_bar_guess", ")", ":", "C_unitless", "=", "C_data", ".", "magnitude", "C_units", "=", "str", "(", "C_bar_guess", ".", "units", ")", "t_seconds", "=", "(", "t_data", ".", "to",...
Use non-linear least squares to fit the function Tracer_CMFR_N(t_seconds, t_bar, C_bar, N) to reactor data. :param t_data: Array of times with units :type t_data: float list :param C_data: Array of tracer concentration data with units :type C_data: float list :param theta_guess: Estimate of tim...
[ "Use", "non", "-", "linear", "least", "squares", "to", "fit", "the", "function", "Tracer_CMFR_N", "(", "t_seconds", "t_bar", "C_bar", "N", ")", "to", "reactor", "data", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L341-L371
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
Tracer_AD_Pe
def Tracer_AD_Pe(t_seconds, t_bar, C_bar, Pe): """Used by Solver_AD_Pe. All inputs and outputs are unitless. This is the model function, f(x, ...). It takes the independent variable as the first argument and the parameters to fit as separate remaining arguments. :param t_seconds: List of times :typ...
python
def Tracer_AD_Pe(t_seconds, t_bar, C_bar, Pe): """Used by Solver_AD_Pe. All inputs and outputs are unitless. This is the model function, f(x, ...). It takes the independent variable as the first argument and the parameters to fit as separate remaining arguments. :param t_seconds: List of times :typ...
[ "def", "Tracer_AD_Pe", "(", "t_seconds", ",", "t_bar", ",", "C_bar", ",", "Pe", ")", ":", "return", "C_bar", "*", "E_Advective_Dispersion", "(", "t_seconds", "/", "t_bar", ",", "Pe", ")" ]
Used by Solver_AD_Pe. All inputs and outputs are unitless. This is the model function, f(x, ...). It takes the independent variable as the first argument and the parameters to fit as separate remaining arguments. :param t_seconds: List of times :type t_seconds: float list :param t_bar: Average time...
[ "Used", "by", "Solver_AD_Pe", ".", "All", "inputs", "and", "outputs", "are", "unitless", ".", "This", "is", "the", "model", "function", "f", "(", "x", "...", ")", ".", "It", "takes", "the", "independent", "variable", "as", "the", "first", "argument", "an...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L374-L399
AguaClara/aguaclara
aguaclara/research/environmental_processes_analysis.py
Solver_AD_Pe
def Solver_AD_Pe(t_data, C_data, theta_guess, C_bar_guess): """Use non-linear least squares to fit the function Tracer_AD_Pe(t_seconds, t_bar, C_bar, Pe) to reactor data. :param t_data: Array of times with units :type t_data: float list :param C_data: Array of tracer concentration data with units ...
python
def Solver_AD_Pe(t_data, C_data, theta_guess, C_bar_guess): """Use non-linear least squares to fit the function Tracer_AD_Pe(t_seconds, t_bar, C_bar, Pe) to reactor data. :param t_data: Array of times with units :type t_data: float list :param C_data: Array of tracer concentration data with units ...
[ "def", "Solver_AD_Pe", "(", "t_data", ",", "C_data", ",", "theta_guess", ",", "C_bar_guess", ")", ":", "#remove time=0 data to eliminate divide by zero error", "t_data", "=", "t_data", "[", "1", ":", "-", "1", "]", "C_data", "=", "C_data", "[", "1", ":", "-", ...
Use non-linear least squares to fit the function Tracer_AD_Pe(t_seconds, t_bar, C_bar, Pe) to reactor data. :param t_data: Array of times with units :type t_data: float list :param C_data: Array of tracer concentration data with units :type C_data: float list :param theta_guess: Estimate of tim...
[ "Use", "non", "-", "linear", "least", "squares", "to", "fit", "the", "function", "Tracer_AD_Pe", "(", "t_seconds", "t_bar", "C_bar", "Pe", ")", "to", "reactor", "data", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/environmental_processes_analysis.py#L402-L435
AguaClara/aguaclara
aguaclara/play.py
set_sig_figs
def set_sig_figs(n=4): """Set the number of significant figures used to print Pint, Pandas, and NumPy quantities. Args: n (int): Number of significant figures to display. """ u.default_format = '.' + str(n) + 'g' pd.options.display.float_format = ('{:,.' + str(n) + '}').format
python
def set_sig_figs(n=4): """Set the number of significant figures used to print Pint, Pandas, and NumPy quantities. Args: n (int): Number of significant figures to display. """ u.default_format = '.' + str(n) + 'g' pd.options.display.float_format = ('{:,.' + str(n) + '}').format
[ "def", "set_sig_figs", "(", "n", "=", "4", ")", ":", "u", ".", "default_format", "=", "'.'", "+", "str", "(", "n", ")", "+", "'g'", "pd", ".", "options", ".", "display", ".", "float_format", "=", "(", "'{:,.'", "+", "str", "(", "n", ")", "+", "...
Set the number of significant figures used to print Pint, Pandas, and NumPy quantities. Args: n (int): Number of significant figures to display.
[ "Set", "the", "number", "of", "significant", "figures", "used", "to", "print", "Pint", "Pandas", "and", "NumPy", "quantities", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/play.py#L43-L51
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
get_data_by_time
def get_data_by_time(path, columns, dates, start_time='00:00', end_time='23:59'): """Extract columns of data from a ProCoDA datalog based on date(s) and time(s) Note: Column 0 is time. The first data column is column 1. :param path: The path to the folder containing the ProCoDA data file(s) :type path...
python
def get_data_by_time(path, columns, dates, start_time='00:00', end_time='23:59'): """Extract columns of data from a ProCoDA datalog based on date(s) and time(s) Note: Column 0 is time. The first data column is column 1. :param path: The path to the folder containing the ProCoDA data file(s) :type path...
[ "def", "get_data_by_time", "(", "path", ",", "columns", ",", "dates", ",", "start_time", "=", "'00:00'", ",", "end_time", "=", "'23:59'", ")", ":", "data", "=", "data_from_dates", "(", "path", ",", "dates", ")", "first_time_column", "=", "pd", ".", "to_num...
Extract columns of data from a ProCoDA datalog based on date(s) and time(s) Note: Column 0 is time. The first data column is column 1. :param path: The path to the folder containing the ProCoDA data file(s) :type path: string :param columns: A single index of a column OR a list of indices of columns o...
[ "Extract", "columns", "of", "data", "from", "a", "ProCoDA", "datalog", "based", "on", "date", "(", "s", ")", "and", "time", "(", "s", ")" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L9-L50
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
remove_notes
def remove_notes(data): """Omit notes from a DataFrame object, where notes are identified as rows with non-numerical entries in the first column. :param data: DataFrame object to remove notes from :type data: Pandas.DataFrame :return: DataFrame object with no notes :rtype: Pandas.DataFrame """...
python
def remove_notes(data): """Omit notes from a DataFrame object, where notes are identified as rows with non-numerical entries in the first column. :param data: DataFrame object to remove notes from :type data: Pandas.DataFrame :return: DataFrame object with no notes :rtype: Pandas.DataFrame """...
[ "def", "remove_notes", "(", "data", ")", ":", "has_text", "=", "data", ".", "iloc", "[", ":", ",", "0", "]", ".", "astype", "(", "str", ")", ".", "str", ".", "contains", "(", "'(?!e-)[a-zA-Z]'", ")", "text_rows", "=", "list", "(", "has_text", ".", ...
Omit notes from a DataFrame object, where notes are identified as rows with non-numerical entries in the first column. :param data: DataFrame object to remove notes from :type data: Pandas.DataFrame :return: DataFrame object with no notes :rtype: Pandas.DataFrame
[ "Omit", "notes", "from", "a", "DataFrame", "object", "where", "notes", "are", "identified", "as", "rows", "with", "non", "-", "numerical", "entries", "in", "the", "first", "column", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L53-L64
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
day_fraction
def day_fraction(time): """Convert a 24-hour time to a fraction of a day. For example, midnight corresponds to 0.0, and noon to 0.5. :param time: Time in the form of 'HH:MM' (24-hour time) :type time: string :return: A day fraction :rtype: float :Examples: .. code-block:: python ...
python
def day_fraction(time): """Convert a 24-hour time to a fraction of a day. For example, midnight corresponds to 0.0, and noon to 0.5. :param time: Time in the form of 'HH:MM' (24-hour time) :type time: string :return: A day fraction :rtype: float :Examples: .. code-block:: python ...
[ "def", "day_fraction", "(", "time", ")", ":", "hour", "=", "int", "(", "time", ".", "split", "(", "\":\"", ")", "[", "0", "]", ")", "minute", "=", "int", "(", "time", ".", "split", "(", "\":\"", ")", "[", "1", "]", ")", "return", "hour", "/", ...
Convert a 24-hour time to a fraction of a day. For example, midnight corresponds to 0.0, and noon to 0.5. :param time: Time in the form of 'HH:MM' (24-hour time) :type time: string :return: A day fraction :rtype: float :Examples: .. code-block:: python day_fraction("18:30")
[ "Convert", "a", "24", "-", "hour", "time", "to", "a", "fraction", "of", "a", "day", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L67-L86
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
time_column_index
def time_column_index(time, time_column): """Return the index of lowest time in the column of times that is greater than or equal to the given time. :param time: the time to index from the column of time; a day fraction :type time: float :param time_column: a list of times (in day fractions), must ...
python
def time_column_index(time, time_column): """Return the index of lowest time in the column of times that is greater than or equal to the given time. :param time: the time to index from the column of time; a day fraction :type time: float :param time_column: a list of times (in day fractions), must ...
[ "def", "time_column_index", "(", "time", ",", "time_column", ")", ":", "interval", "=", "time_column", "[", "1", "]", "-", "time_column", "[", "0", "]", "return", "int", "(", "round", "(", "(", "time", "-", "time_column", "[", "0", "]", ")", "/", "in...
Return the index of lowest time in the column of times that is greater than or equal to the given time. :param time: the time to index from the column of time; a day fraction :type time: float :param time_column: a list of times (in day fractions), must be increasing and equally spaced :type time_c...
[ "Return", "the", "index", "of", "lowest", "time", "in", "the", "column", "of", "times", "that", "is", "greater", "than", "or", "equal", "to", "the", "given", "time", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L89-L102
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
data_from_dates
def data_from_dates(path, dates): """Return list DataFrames representing the ProCoDA datalogs stored in the given path and recorded on the given dates. :param path: The path to the folder containing the ProCoDA data file(s) :type path: string :param dates: A single date or list of dates for which d...
python
def data_from_dates(path, dates): """Return list DataFrames representing the ProCoDA datalogs stored in the given path and recorded on the given dates. :param path: The path to the folder containing the ProCoDA data file(s) :type path: string :param dates: A single date or list of dates for which d...
[ "def", "data_from_dates", "(", "path", ",", "dates", ")", ":", "if", "path", "[", "-", "1", "]", "!=", "os", ".", "path", ".", "sep", ":", "path", "+=", "os", ".", "path", ".", "sep", "if", "not", "isinstance", "(", "dates", ",", "list", ")", "...
Return list DataFrames representing the ProCoDA datalogs stored in the given path and recorded on the given dates. :param path: The path to the folder containing the ProCoDA data file(s) :type path: string :param dates: A single date or list of dates for which data was recorded, formatted "M-D-YYYY" ...
[ "Return", "list", "DataFrames", "representing", "the", "ProCoDA", "datalogs", "stored", "in", "the", "given", "path", "and", "recorded", "on", "the", "given", "dates", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L105-L128
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
column_start_to_end
def column_start_to_end(data, column, start_idx, end_idx): """Return a list of numeric data entries in the given column from the starting index to the ending index. This can list can be compiled over one or more DataFrames. :param data: a list of DataFrames to extract data in one column from :type ...
python
def column_start_to_end(data, column, start_idx, end_idx): """Return a list of numeric data entries in the given column from the starting index to the ending index. This can list can be compiled over one or more DataFrames. :param data: a list of DataFrames to extract data in one column from :type ...
[ "def", "column_start_to_end", "(", "data", ",", "column", ",", "start_idx", ",", "end_idx", ")", ":", "if", "len", "(", "data", ")", "==", "1", ":", "result", "=", "list", "(", "pd", ".", "to_numeric", "(", "data", "[", "0", "]", ".", "iloc", "[", ...
Return a list of numeric data entries in the given column from the starting index to the ending index. This can list can be compiled over one or more DataFrames. :param data: a list of DataFrames to extract data in one column from :type data: Pandas.DataFrame list :param column: a column index ...
[ "Return", "a", "list", "of", "numeric", "data", "entries", "in", "the", "given", "column", "from", "the", "starting", "index", "to", "the", "ending", "index", ".", "This", "can", "list", "can", "be", "compiled", "over", "one", "or", "more", "DataFrames", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L131-L160
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
get_data_by_state
def get_data_by_state(path, dates, state, column): """Reads a ProCoDA file and extracts the time and data column for each iteration ofthe given state. Note: column 0 is time, the first data column is column 1. :param path: The path to the folder containing the ProCoDA data file(s), defaults to the cur...
python
def get_data_by_state(path, dates, state, column): """Reads a ProCoDA file and extracts the time and data column for each iteration ofthe given state. Note: column 0 is time, the first data column is column 1. :param path: The path to the folder containing the ProCoDA data file(s), defaults to the cur...
[ "def", "get_data_by_state", "(", "path", ",", "dates", ",", "state", ",", "column", ")", ":", "data_agg", "=", "[", "]", "day", "=", "0", "first_day", "=", "True", "overnight", "=", "False", "extension", "=", "\".xls\"", "if", "path", "[", "-", "1", ...
Reads a ProCoDA file and extracts the time and data column for each iteration ofthe given state. Note: column 0 is time, the first data column is column 1. :param path: The path to the folder containing the ProCoDA data file(s), defaults to the current directory :type path: string :param dates: A ...
[ "Reads", "a", "ProCoDA", "file", "and", "extracts", "the", "time", "and", "data", "column", "for", "each", "iteration", "ofthe", "given", "state", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L163-L256
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
column_of_time
def column_of_time(path, start, end=-1): """This function extracts the column of times from a ProCoDA data file. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is sufficient. :type path: string :param start: Index of first row of data to...
python
def column_of_time(path, start, end=-1): """This function extracts the column of times from a ProCoDA data file. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is sufficient. :type path: string :param start: Index of first row of data to...
[ "def", "column_of_time", "(", "path", ",", "start", ",", "end", "=", "-", "1", ")", ":", "df", "=", "pd", ".", "read_csv", "(", "path", ",", "delimiter", "=", "'\\t'", ")", "start_time", "=", "pd", ".", "to_numeric", "(", "df", ".", "iloc", "[", ...
This function extracts the column of times from a ProCoDA data file. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is sufficient. :type path: string :param start: Index of first row of data to extract from the data file :type start: int...
[ "This", "function", "extracts", "the", "column", "of", "times", "from", "a", "ProCoDA", "data", "file", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L259-L282
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
column_of_data
def column_of_data(path, start, column, end="-1", units=""): """This function extracts a column of data from a ProCoDA data file. Note: Column 0 is time. The first data column is column 1. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is s...
python
def column_of_data(path, start, column, end="-1", units=""): """This function extracts a column of data from a ProCoDA data file. Note: Column 0 is time. The first data column is column 1. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is s...
[ "def", "column_of_data", "(", "path", ",", "start", ",", "column", ",", "end", "=", "\"-1\"", ",", "units", "=", "\"\"", ")", ":", "if", "not", "isinstance", "(", "start", ",", "int", ")", ":", "start", "=", "int", "(", "start", ")", "if", "not", ...
This function extracts a column of data from a ProCoDA data file. Note: Column 0 is time. The first data column is column 1. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is sufficient. :type path: string :param start: Index of first r...
[ "This", "function", "extracts", "a", "column", "of", "data", "from", "a", "ProCoDA", "data", "file", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L285-L326
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
notes
def notes(path): """This function extracts any experimental notes from a ProCoDA data file. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is sufficient. :type path: string :return: The rows of the data file that contain text notes inse...
python
def notes(path): """This function extracts any experimental notes from a ProCoDA data file. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is sufficient. :type path: string :return: The rows of the data file that contain text notes inse...
[ "def", "notes", "(", "path", ")", ":", "df", "=", "pd", ".", "read_csv", "(", "path", ",", "delimiter", "=", "'\\t'", ")", "text_row", "=", "df", ".", "iloc", "[", "0", ":", "-", "1", ",", "0", "]", ".", "str", ".", "contains", "(", "'[a-z]'", ...
This function extracts any experimental notes from a ProCoDA data file. :param path: The file path of the ProCoDA data file. If the file is in the working directory, then the file name is sufficient. :type path: string :return: The rows of the data file that contain text notes inserted during the experime...
[ "This", "function", "extracts", "any", "experimental", "notes", "from", "a", "ProCoDA", "data", "file", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L329-L342
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
read_state_with_metafile
def read_state_with_metafile(func, state, column, path, metaids=[], extension=".xls", units=""): """Takes in a ProCoDA meta file and performs a function for all data of a certain state in each of the experiments (denoted by file paths in then metafile) Note: Column 0 is tim...
python
def read_state_with_metafile(func, state, column, path, metaids=[], extension=".xls", units=""): """Takes in a ProCoDA meta file and performs a function for all data of a certain state in each of the experiments (denoted by file paths in then metafile) Note: Column 0 is tim...
[ "def", "read_state_with_metafile", "(", "func", ",", "state", ",", "column", ",", "path", ",", "metaids", "=", "[", "]", ",", "extension", "=", "\".xls\"", ",", "units", "=", "\"\"", ")", ":", "outputs", "=", "[", "]", "metafile", "=", "pd", ".", "re...
Takes in a ProCoDA meta file and performs a function for all data of a certain state in each of the experiments (denoted by file paths in then metafile) Note: Column 0 is time. The first data column is column 1. :param func: A function that will be applied to data from each instance of the state :...
[ "Takes", "in", "a", "ProCoDA", "meta", "file", "and", "performs", "a", "function", "for", "all", "data", "of", "a", "certain", "state", "in", "each", "of", "the", "experiments", "(", "denoted", "by", "file", "paths", "in", "then", "metafile", ")" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L666-L764
AguaClara/aguaclara
aguaclara/research/procoda_parser.py
write_calculations_to_csv
def write_calculations_to_csv(funcs, states, columns, path, headers, out_name, metaids=[], extension=".xls"): """Writes each output of the given functions on the given states and data columns to a new column in the specified output file. Note: Column 0 is time. The first data ...
python
def write_calculations_to_csv(funcs, states, columns, path, headers, out_name, metaids=[], extension=".xls"): """Writes each output of the given functions on the given states and data columns to a new column in the specified output file. Note: Column 0 is time. The first data ...
[ "def", "write_calculations_to_csv", "(", "funcs", ",", "states", ",", "columns", ",", "path", ",", "headers", ",", "out_name", ",", "metaids", "=", "[", "]", ",", "extension", "=", "\".xls\"", ")", ":", "if", "not", "isinstance", "(", "funcs", ",", "list...
Writes each output of the given functions on the given states and data columns to a new column in the specified output file. Note: Column 0 is time. The first data column is column 1. :param funcs: A function or list of functions which will be applied in order to the data. If only one function is given it...
[ "Writes", "each", "output", "of", "the", "given", "functions", "on", "the", "given", "states", "and", "data", "columns", "to", "a", "new", "column", "in", "the", "specified", "output", "file", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/procoda_parser.py#L767-L815
AguaClara/aguaclara
aguaclara/design/sed_tank.py
n_sed_plates_max
def n_sed_plates_max(sed_inputs=sed_dict): """Return the maximum possible number of plate settlers in a module given plate spacing, thickness, angle, and unsupported length of plate settler. Parameters ---------- S_plate : float Edge to edge distance between plate settlers thickness_plat...
python
def n_sed_plates_max(sed_inputs=sed_dict): """Return the maximum possible number of plate settlers in a module given plate spacing, thickness, angle, and unsupported length of plate settler. Parameters ---------- S_plate : float Edge to edge distance between plate settlers thickness_plat...
[ "def", "n_sed_plates_max", "(", "sed_inputs", "=", "sed_dict", ")", ":", "B_plate", "=", "sed_inputs", "[", "'plate_settlers'", "]", "[", "'S'", "]", "+", "sed_inputs", "[", "'plate_settlers'", "]", "[", "'thickness'", "]", "return", "math", ".", "floor", "(...
Return the maximum possible number of plate settlers in a module given plate spacing, thickness, angle, and unsupported length of plate settler. Parameters ---------- S_plate : float Edge to edge distance between plate settlers thickness_plate : float Thickness of PVC sheet used to m...
[ "Return", "the", "maximum", "possible", "number", "of", "plate", "settlers", "in", "a", "module", "given", "plate", "spacing", "thickness", "angle", "and", "unsupported", "length", "of", "plate", "settler", ".", "Parameters", "----------", "S_plate", ":", "float...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L291-L317
AguaClara/aguaclara
aguaclara/design/sed_tank.py
w_diffuser_inner_min
def w_diffuser_inner_min(sed_inputs=sed_dict): """Return the minimum inner width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations. Can be found in sed.yaml Returns...
python
def w_diffuser_inner_min(sed_inputs=sed_dict): """Return the minimum inner width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations. Can be found in sed.yaml Returns...
[ "def", "w_diffuser_inner_min", "(", "sed_inputs", "=", "sed_dict", ")", ":", "return", "(", "(", "sed_inputs", "[", "'tank'", "]", "[", "'vel_up'", "]", ".", "to", "(", "u", ".", "inch", "/", "u", ".", "s", ")", ".", "magnitude", "/", "sed_inputs", "...
Return the minimum inner width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations. Can be found in sed.yaml Returns ------- float Minimum inner width of ...
[ "Return", "the", "minimum", "inner", "width", "of", "each", "diffuser", "in", "the", "sedimentation", "tank", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedim...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L320-L338
AguaClara/aguaclara
aguaclara/design/sed_tank.py
w_diffuser_inner
def w_diffuser_inner(sed_inputs=sed_dict): """Return the inner width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- ...
python
def w_diffuser_inner(sed_inputs=sed_dict): """Return the inner width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- ...
[ "def", "w_diffuser_inner", "(", "sed_inputs", "=", "sed_dict", ")", ":", "return", "ut", ".", "ceil_nearest", "(", "w_diffuser_inner_min", "(", "sed_inputs", ")", ".", "magnitude", ",", "(", "np", ".", "arange", "(", "1", "/", "16", ",", "1", "/", "4", ...
Return the inner width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Inner width of each diffuser in ...
[ "Return", "the", "inner", "width", "of", "each", "diffuser", "in", "the", "sedimentation", "tank", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedimentation", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L341-L358
AguaClara/aguaclara
aguaclara/design/sed_tank.py
w_diffuser_outer
def w_diffuser_outer(sed_inputs=sed_dict): """Return the outer width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- ...
python
def w_diffuser_outer(sed_inputs=sed_dict): """Return the outer width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- ...
[ "def", "w_diffuser_outer", "(", "sed_inputs", "=", "sed_dict", ")", ":", "return", "(", "w_diffuser_inner_min", "(", "sed_inputs", "[", "'tank'", "]", "[", "'W'", "]", ")", "+", "(", "2", "*", "sed_inputs", "[", "'manifold'", "]", "[", "'diffuser'", "]", ...
Return the outer width of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Outer width of each diffuser in ...
[ "Return", "the", "outer", "width", "of", "each", "diffuser", "in", "the", "sedimentation", "tank", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedimentation", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L361-L378
AguaClara/aguaclara
aguaclara/design/sed_tank.py
L_diffuser_outer
def L_diffuser_outer(sed_inputs=sed_dict): """Return the outer length of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns -------...
python
def L_diffuser_outer(sed_inputs=sed_dict): """Return the outer length of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns -------...
[ "def", "L_diffuser_outer", "(", "sed_inputs", "=", "sed_dict", ")", ":", "return", "(", "(", "sed_inputs", "[", "'manifold'", "]", "[", "'diffuser'", "]", "[", "'A'", "]", "/", "(", "2", "*", "sed_inputs", "[", "'manifold'", "]", "[", "'diffuser'", "]", ...
Return the outer length of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Outer length of each diffuser i...
[ "Return", "the", "outer", "length", "of", "each", "diffuser", "in", "the", "sedimentation", "tank", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedimentation", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L381-L399
AguaClara/aguaclara
aguaclara/design/sed_tank.py
L_diffuser_inner
def L_diffuser_inner(sed_inputs=sed_dict): """Return the inner length of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns -------...
python
def L_diffuser_inner(sed_inputs=sed_dict): """Return the inner length of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns -------...
[ "def", "L_diffuser_inner", "(", "sed_inputs", "=", "sed_dict", ")", ":", "return", "L_diffuser_outer", "(", "sed_inputs", "[", "'tank'", "]", "[", "'W'", "]", ")", "-", "(", "2", "*", "(", "sed_inputs", "[", "'manifold'", "]", "[", "'diffuser'", "]", "["...
Return the inner length of each diffuser in the sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Inner length of each diffuser i...
[ "Return", "the", "inner", "length", "of", "each", "diffuser", "in", "the", "sedimentation", "tank", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedimentation", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L402-L419
AguaClara/aguaclara
aguaclara/design/sed_tank.py
q_diffuser
def q_diffuser(sed_inputs=sed_dict): """Return the flow through each diffuser. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Flow through eac...
python
def q_diffuser(sed_inputs=sed_dict): """Return the flow through each diffuser. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Flow through eac...
[ "def", "q_diffuser", "(", "sed_inputs", "=", "sed_dict", ")", ":", "return", "(", "sed_inputs", "[", "'tank'", "]", "[", "'vel_up'", "]", ".", "to", "(", "u", ".", "m", "/", "u", ".", "s", ")", "*", "sed_inputs", "[", "'tank'", "]", "[", "'W'", "...
Return the flow through each diffuser. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Flow through each diffuser in the sedimentation tank Exa...
[ "Return", "the", "flow", "through", "each", "diffuser", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedimentation", "tank", "calculations", "can", "be", "found",...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L422-L440
AguaClara/aguaclara
aguaclara/design/sed_tank.py
vel_sed_diffuser
def vel_sed_diffuser(sed_inputs=sed_dict): """Return the velocity through each diffuser. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Flow t...
python
def vel_sed_diffuser(sed_inputs=sed_dict): """Return the velocity through each diffuser. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Flow t...
[ "def", "vel_sed_diffuser", "(", "sed_inputs", "=", "sed_dict", ")", ":", "return", "(", "q_diffuser", "(", "sed_inputs", ")", ".", "magnitude", "/", "(", "w_diffuser_inner", "(", "w_tank", ")", "*", "L_diffuser_inner", "(", "w_tank", ")", ")", ".", "magnitud...
Return the velocity through each diffuser. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Flow through each diffuser in the sedimentation tank ...
[ "Return", "the", "velocity", "through", "each", "diffuser", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedimentation", "tank", "calculations", "can", "be", "fou...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L443-L460
AguaClara/aguaclara
aguaclara/design/sed_tank.py
q_tank
def q_tank(sed_inputs=sed_dict): """Return the maximum flow through one sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Max...
python
def q_tank(sed_inputs=sed_dict): """Return the maximum flow through one sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Max...
[ "def", "q_tank", "(", "sed_inputs", "=", "sed_dict", ")", ":", "return", "(", "sed_inputs", "[", "'tank'", "]", "[", "'L'", "]", "*", "sed_inputs", "[", "'tank'", "]", "[", "'vel_up'", "]", ".", "to", "(", "u", ".", "m", "/", "u", ".", "s", ")", ...
Return the maximum flow through one sedimentation tank. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Maximum flow through one sedimentation tank...
[ "Return", "the", "maximum", "flow", "through", "one", "sedimentation", "tank", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedimentation", "tank", "calculations", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L463-L480
AguaClara/aguaclara
aguaclara/design/sed_tank.py
vel_inlet_man_max
def vel_inlet_man_max(sed_inputs=sed_dict): """Return the maximum velocity through the manifold. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float ...
python
def vel_inlet_man_max(sed_inputs=sed_dict): """Return the maximum velocity through the manifold. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float ...
[ "def", "vel_inlet_man_max", "(", "sed_inputs", "=", "sed_dict", ")", ":", "vel_manifold_max", "=", "(", "sed_inputs", "[", "'diffuser'", "]", "[", "'vel_max'", "]", ".", "to", "(", "u", ".", "m", "/", "u", ".", "s", ")", ".", "magnitude", "*", "sqrt", ...
Return the maximum velocity through the manifold. Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- float Maximum velocity through the manifold. Exampl...
[ "Return", "the", "maximum", "velocity", "through", "the", "manifold", ".", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of", "the", "constant", "inputs", "needed", "for", "sedimentation", "tank", "calculations", "can", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L483-L502
AguaClara/aguaclara
aguaclara/design/sed_tank.py
n_tanks
def n_tanks(Q_plant, sed_inputs=sed_dict): """Return the number of sedimentation tanks required for a given flow rate. Parameters ---------- Q_plant : float Total plant flow rate sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calcul...
python
def n_tanks(Q_plant, sed_inputs=sed_dict): """Return the number of sedimentation tanks required for a given flow rate. Parameters ---------- Q_plant : float Total plant flow rate sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calcul...
[ "def", "n_tanks", "(", "Q_plant", ",", "sed_inputs", "=", "sed_dict", ")", ":", "q", "=", "q_tank", "(", "sed_inputs", ")", ".", "magnitude", "return", "(", "int", "(", "np", ".", "ceil", "(", "Q_plant", "/", "q", ")", ")", ")" ]
Return the number of sedimentation tanks required for a given flow rate. Parameters ---------- Q_plant : float Total plant flow rate sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns --...
[ "Return", "the", "number", "of", "sedimentation", "tanks", "required", "for", "a", "given", "flow", "rate", ".", "Parameters", "----------", "Q_plant", ":", "float", "Total", "plant", "flow", "rate", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L505-L524
AguaClara/aguaclara
aguaclara/design/sed_tank.py
L_channel
def L_channel(Q_plant, sed_inputs=sed_dict): """Return the length of the inlet and exit channels for the sedimentation tank. Parameters ---------- Q_plant : float Total plant flow rate sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank ...
python
def L_channel(Q_plant, sed_inputs=sed_dict): """Return the length of the inlet and exit channels for the sedimentation tank. Parameters ---------- Q_plant : float Total plant flow rate sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank ...
[ "def", "L_channel", "(", "Q_plant", ",", "sed_inputs", "=", "sed_dict", ")", ":", "n_tanks", "=", "n_tanks", "(", "Q_plant", ",", "sed_inputs", ")", "return", "(", "(", "n_tanks", "*", "sed_inputs", "[", "'tank'", "]", "[", "'W'", "]", ")", "+", "sed_i...
Return the length of the inlet and exit channels for the sedimentation tank. Parameters ---------- Q_plant : float Total plant flow rate sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ...
[ "Return", "the", "length", "of", "the", "inlet", "and", "exit", "channels", "for", "the", "sedimentation", "tank", ".", "Parameters", "----------", "Q_plant", ":", "float", "Total", "plant", "flow", "rate", "sed_inputs", ":", "dict", "A", "dictionary", "of", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L527-L547
AguaClara/aguaclara
aguaclara/design/sed_tank.py
ID_exit_man
def ID_exit_man(Q_plant, temp, sed_inputs=sed_dict): """Return the inner diameter of the exit manifold by guessing an initial diameter then iterating through pipe flow calculations until the answer converges within 1%% error Parameters ---------- Q_plant : float Total plant flow rate ...
python
def ID_exit_man(Q_plant, temp, sed_inputs=sed_dict): """Return the inner diameter of the exit manifold by guessing an initial diameter then iterating through pipe flow calculations until the answer converges within 1%% error Parameters ---------- Q_plant : float Total plant flow rate ...
[ "def", "ID_exit_man", "(", "Q_plant", ",", "temp", ",", "sed_inputs", "=", "sed_dict", ")", ":", "#Inputs do not need to be checked here because they are checked by", "#functions this function calls.", "nu", "=", "pc", ".", "viscosity_dynamic", "(", "temp", ")", "hl", "...
Return the inner diameter of the exit manifold by guessing an initial diameter then iterating through pipe flow calculations until the answer converges within 1%% error Parameters ---------- Q_plant : float Total plant flow rate temp : float Design temperature sed_inputs : di...
[ "Return", "the", "inner", "diameter", "of", "the", "exit", "manifold", "by", "guessing", "an", "initial", "diameter", "then", "iterating", "through", "pipe", "flow", "calculations", "until", "the", "answer", "converges", "within", "1%%", "error", "Parameters", "...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L551-L593
AguaClara/aguaclara
aguaclara/design/sed_tank.py
D_exit_man_orifice
def D_exit_man_orifice(Q_plant, drill_bits, sed_inputs=sed_dict): """Return the diameter of the orifices in the exit manifold for the sedimentation tank. Parameters ---------- Q_plant : float Total plant flow rate drill_bits : list List of possible drill bit sizes sed_inputs : di...
python
def D_exit_man_orifice(Q_plant, drill_bits, sed_inputs=sed_dict): """Return the diameter of the orifices in the exit manifold for the sedimentation tank. Parameters ---------- Q_plant : float Total plant flow rate drill_bits : list List of possible drill bit sizes sed_inputs : di...
[ "def", "D_exit_man_orifice", "(", "Q_plant", ",", "drill_bits", ",", "sed_inputs", "=", "sed_dict", ")", ":", "Q_orifice", "=", "Q_plant", "/", "sed_input", "[", "'exit_man'", "]", "[", "'N_orifices'", "]", "D_orifice", "=", "np", ".", "sqrt", "(", "Q_orific...
Return the diameter of the orifices in the exit manifold for the sedimentation tank. Parameters ---------- Q_plant : float Total plant flow rate drill_bits : list List of possible drill bit sizes sed_inputs : dict A dictionary of all of the constant inputs needed for sediment...
[ "Return", "the", "diameter", "of", "the", "orifices", "in", "the", "exit", "manifold", "for", "the", "sedimentation", "tank", ".", "Parameters", "----------", "Q_plant", ":", "float", "Total", "plant", "flow", "rate", "drill_bits", ":", "list", "List", "of", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L596-L618
AguaClara/aguaclara
aguaclara/design/sed_tank.py
L_sed_plate
def L_sed_plate(sed_inputs=sed_dict): """Return the length of a single plate in the plate settler module based on achieving the desired capture velocity Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can b...
python
def L_sed_plate(sed_inputs=sed_dict): """Return the length of a single plate in the plate settler module based on achieving the desired capture velocity Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can b...
[ "def", "L_sed_plate", "(", "sed_inputs", "=", "sed_dict", ")", ":", "L_sed_plate", "=", "(", "(", "sed_input", "[", "'plate_settlers'", "]", "[", "'S'", "]", "*", "(", "(", "sed_input", "[", "'tank'", "]", "[", "'vel_up'", "]", "/", "sed_input", "[", "...
Return the length of a single plate in the plate settler module based on achieving the desired capture velocity Parameters ---------- sed_inputs : dict A dictionary of all of the constant inputs needed for sedimentation tank calculations can be found in sed.yaml Returns ------- ...
[ "Return", "the", "length", "of", "a", "single", "plate", "in", "the", "plate", "settler", "module", "based", "on", "achieving", "the", "desired", "capture", "velocity", "Parameters", "----------", "sed_inputs", ":", "dict", "A", "dictionary", "of", "all", "of"...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/sed_tank.py#L622-L643
AguaClara/aguaclara
aguaclara/core/pipes.py
OD
def OD(ND): """Return a pipe's outer diameter according to its nominal diameter. The pipe schedule is not required here because all of the pipes of a given nominal diameter have the same outer diameter. Steps: 1. Find the index of the closest nominal diameter. (Should this be changed to fin...
python
def OD(ND): """Return a pipe's outer diameter according to its nominal diameter. The pipe schedule is not required here because all of the pipes of a given nominal diameter have the same outer diameter. Steps: 1. Find the index of the closest nominal diameter. (Should this be changed to fin...
[ "def", "OD", "(", "ND", ")", ":", "index", "=", "(", "np", ".", "abs", "(", "np", ".", "array", "(", "pipedb", "[", "'NDinch'", "]", ")", "-", "(", "ND", ")", ")", ")", ".", "argmin", "(", ")", "return", "pipedb", ".", "iloc", "[", "index", ...
Return a pipe's outer diameter according to its nominal diameter. The pipe schedule is not required here because all of the pipes of a given nominal diameter have the same outer diameter. Steps: 1. Find the index of the closest nominal diameter. (Should this be changed to find the next largest ...
[ "Return", "a", "pipe", "s", "outer", "diameter", "according", "to", "its", "nominal", "diameter", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/pipes.py#L42-L55
AguaClara/aguaclara
aguaclara/core/pipes.py
ID_sch40
def ID_sch40(ND): """Return the inner diameter for schedule 40 pipes. The wall thickness for these pipes is in the pipedb. Take the values of the array, subtract the ND, take the absolute value, find the index of the minimium value. """ myindex = (np.abs(np.array(pipedb['NDinch']) - (ND))).arg...
python
def ID_sch40(ND): """Return the inner diameter for schedule 40 pipes. The wall thickness for these pipes is in the pipedb. Take the values of the array, subtract the ND, take the absolute value, find the index of the minimium value. """ myindex = (np.abs(np.array(pipedb['NDinch']) - (ND))).arg...
[ "def", "ID_sch40", "(", "ND", ")", ":", "myindex", "=", "(", "np", ".", "abs", "(", "np", ".", "array", "(", "pipedb", "[", "'NDinch'", "]", ")", "-", "(", "ND", ")", ")", ")", ".", "argmin", "(", ")", "return", "(", "pipedb", ".", "iloc", "[...
Return the inner diameter for schedule 40 pipes. The wall thickness for these pipes is in the pipedb. Take the values of the array, subtract the ND, take the absolute value, find the index of the minimium value.
[ "Return", "the", "inner", "diameter", "for", "schedule", "40", "pipes", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/pipes.py#L67-L76
AguaClara/aguaclara
aguaclara/core/pipes.py
ND_all_available
def ND_all_available(): """Return an array of available nominal diameters. NDs available are those commonly used as based on the 'Used' column in the pipedb. """ ND_all_available = [] for i in range(len(pipedb['NDinch'])): if pipedb.iloc[i, 4] == 1: ND_all_available.append((...
python
def ND_all_available(): """Return an array of available nominal diameters. NDs available are those commonly used as based on the 'Used' column in the pipedb. """ ND_all_available = [] for i in range(len(pipedb['NDinch'])): if pipedb.iloc[i, 4] == 1: ND_all_available.append((...
[ "def", "ND_all_available", "(", ")", ":", "ND_all_available", "=", "[", "]", "for", "i", "in", "range", "(", "len", "(", "pipedb", "[", "'NDinch'", "]", ")", ")", ":", "if", "pipedb", ".", "iloc", "[", "i", ",", "4", "]", "==", "1", ":", "ND_all_...
Return an array of available nominal diameters. NDs available are those commonly used as based on the 'Used' column in the pipedb.
[ "Return", "an", "array", "of", "available", "nominal", "diameters", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/pipes.py#L79-L89
AguaClara/aguaclara
aguaclara/core/pipes.py
ID_SDR_all_available
def ID_SDR_all_available(SDR): """Return an array of inner diameters with a given SDR. IDs available are those commonly used based on the 'Used' column in the pipedb. """ ID = [] ND = ND_all_available() for i in range(len(ND)): ID.append(ID_SDR(ND[i], SDR).magnitude) return ID *...
python
def ID_SDR_all_available(SDR): """Return an array of inner diameters with a given SDR. IDs available are those commonly used based on the 'Used' column in the pipedb. """ ID = [] ND = ND_all_available() for i in range(len(ND)): ID.append(ID_SDR(ND[i], SDR).magnitude) return ID *...
[ "def", "ID_SDR_all_available", "(", "SDR", ")", ":", "ID", "=", "[", "]", "ND", "=", "ND_all_available", "(", ")", "for", "i", "in", "range", "(", "len", "(", "ND", ")", ")", ":", "ID", ".", "append", "(", "ID_SDR", "(", "ND", "[", "i", "]", ",...
Return an array of inner diameters with a given SDR. IDs available are those commonly used based on the 'Used' column in the pipedb.
[ "Return", "an", "array", "of", "inner", "diameters", "with", "a", "given", "SDR", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/pipes.py#L92-L102
AguaClara/aguaclara
aguaclara/core/pipes.py
ND_SDR_available
def ND_SDR_available(ID, SDR): """ Return an available ND given an ID and a schedule. Takes the values of the array, compares to the ID, and finds the index of the first value greater or equal. """ for i in range(len(np.array(ID_SDR_all_available(SDR)))): if np.array(ID_SDR_all_available(SD...
python
def ND_SDR_available(ID, SDR): """ Return an available ND given an ID and a schedule. Takes the values of the array, compares to the ID, and finds the index of the first value greater or equal. """ for i in range(len(np.array(ID_SDR_all_available(SDR)))): if np.array(ID_SDR_all_available(SD...
[ "def", "ND_SDR_available", "(", "ID", ",", "SDR", ")", ":", "for", "i", "in", "range", "(", "len", "(", "np", ".", "array", "(", "ID_SDR_all_available", "(", "SDR", ")", ")", ")", ")", ":", "if", "np", ".", "array", "(", "ID_SDR_all_available", "(", ...
Return an available ND given an ID and a schedule. Takes the values of the array, compares to the ID, and finds the index of the first value greater or equal.
[ "Return", "an", "available", "ND", "given", "an", "ID", "and", "a", "schedule", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/pipes.py#L105-L113
AguaClara/aguaclara
aguaclara/core/pipeline.py
flow_pipeline
def flow_pipeline(diameters, lengths, k_minors, target_headloss, nu=con.WATER_NU, pipe_rough=mats.PVC_PIPE_ROUGH): """ This function takes a single pipeline with multiple sections, each potentially with different diameters, lengths and minor loss coefficients and determines the flow rate f...
python
def flow_pipeline(diameters, lengths, k_minors, target_headloss, nu=con.WATER_NU, pipe_rough=mats.PVC_PIPE_ROUGH): """ This function takes a single pipeline with multiple sections, each potentially with different diameters, lengths and minor loss coefficients and determines the flow rate f...
[ "def", "flow_pipeline", "(", "diameters", ",", "lengths", ",", "k_minors", ",", "target_headloss", ",", "nu", "=", "con", ".", "WATER_NU", ",", "pipe_rough", "=", "mats", ".", "PVC_PIPE_ROUGH", ")", ":", "# Ensure all the arguments except total headloss are the same l...
This function takes a single pipeline with multiple sections, each potentially with different diameters, lengths and minor loss coefficients and determines the flow rate for a given headloss. :param diameters: list of diameters, where the i_th diameter corresponds to the i_th pipe section :type diameters: ...
[ "This", "function", "takes", "a", "single", "pipeline", "with", "multiple", "sections", "each", "potentially", "with", "different", "diameters", "lengths", "and", "minor", "loss", "coefficients", "and", "determines", "the", "flow", "rate", "for", "a", "given", "...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/pipeline.py#L13-L56
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.stout_w_per_flow
def stout_w_per_flow(self, z): """Return the width of a Stout weir at elevation z. More info here. <https://confluence.cornell.edu/display/AGUACLARA/ LFOM+sutro+weir+research> """ w_per_flow = 2 / ((2 * pc.gravity * z) ** (1 / 2) * con.VC_ORIFICE_RATIO *...
python
def stout_w_per_flow(self, z): """Return the width of a Stout weir at elevation z. More info here. <https://confluence.cornell.edu/display/AGUACLARA/ LFOM+sutro+weir+research> """ w_per_flow = 2 / ((2 * pc.gravity * z) ** (1 / 2) * con.VC_ORIFICE_RATIO *...
[ "def", "stout_w_per_flow", "(", "self", ",", "z", ")", ":", "w_per_flow", "=", "2", "/", "(", "(", "2", "*", "pc", ".", "gravity", "*", "z", ")", "**", "(", "1", "/", "2", ")", "*", "con", ".", "VC_ORIFICE_RATIO", "*", "np", ".", "pi", "*", "...
Return the width of a Stout weir at elevation z. More info here. <https://confluence.cornell.edu/display/AGUACLARA/ LFOM+sutro+weir+research>
[ "Return", "the", "width", "of", "a", "Stout", "weir", "at", "elevation", "z", ".", "More", "info", "here", ".", "<https", ":", "//", "confluence", ".", "cornell", ".", "edu", "/", "display", "/", "AGUACLARA", "/", "LFOM", "+", "sutro", "+", "weir", "...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L24-L31
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.n_rows
def n_rows(self): """This equation states that the open area corresponding to one row can be set equal to two orifices of diameter=row height. If there are more than two orifices per row at the top of the LFOM then there are more orifices than are convenient to drill and more than ...
python
def n_rows(self): """This equation states that the open area corresponding to one row can be set equal to two orifices of diameter=row height. If there are more than two orifices per row at the top of the LFOM then there are more orifices than are convenient to drill and more than ...
[ "def", "n_rows", "(", "self", ")", ":", "N_estimated", "=", "(", "self", ".", "hl", "*", "np", ".", "pi", "/", "(", "2", "*", "self", ".", "stout_w_per_flow", "(", "self", ".", "hl", ")", "*", "self", ".", "q", ")", ")", ".", "to", "(", "u", ...
This equation states that the open area corresponding to one row can be set equal to two orifices of diameter=row height. If there are more than two orifices per row at the top of the LFOM then there are more orifices than are convenient to drill and more than necessary for good accuracy...
[ "This", "equation", "states", "that", "the", "open", "area", "corresponding", "to", "one", "row", "can", "be", "set", "equal", "to", "two", "orifices", "of", "diameter", "=", "row", "height", ".", "If", "there", "are", "more", "than", "two", "orifices", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L34-L50
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.vel_critical
def vel_critical(self): """The average vertical velocity of the water inside the LFOM pipe at the very bottom of the bottom row of orifices The speed of falling water is 0.841 m/s for all linear flow orifice meters of height 20 cm, independent of total plant flow rate. """ return...
python
def vel_critical(self): """The average vertical velocity of the water inside the LFOM pipe at the very bottom of the bottom row of orifices The speed of falling water is 0.841 m/s for all linear flow orifice meters of height 20 cm, independent of total plant flow rate. """ return...
[ "def", "vel_critical", "(", "self", ")", ":", "return", "(", "4", "/", "(", "3", "*", "math", ".", "pi", ")", "*", "(", "2", "*", "pc", ".", "gravity", "*", "self", ".", "hl", ")", "**", "(", "1", "/", "2", ")", ")", ".", "to", "(", "u", ...
The average vertical velocity of the water inside the LFOM pipe at the very bottom of the bottom row of orifices The speed of falling water is 0.841 m/s for all linear flow orifice meters of height 20 cm, independent of total plant flow rate.
[ "The", "average", "vertical", "velocity", "of", "the", "water", "inside", "the", "LFOM", "pipe", "at", "the", "very", "bottom", "of", "the", "bottom", "row", "of", "orifices", "The", "speed", "of", "falling", "water", "is", "0", ".", "841", "m", "/", "...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L59-L64
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.area_pipe_min
def area_pipe_min(self): """The minimum cross-sectional area of the LFOM pipe that assures a safety factor.""" return (self.safety_factor * self.q / self.vel_critical).to(u.cm**2)
python
def area_pipe_min(self): """The minimum cross-sectional area of the LFOM pipe that assures a safety factor.""" return (self.safety_factor * self.q / self.vel_critical).to(u.cm**2)
[ "def", "area_pipe_min", "(", "self", ")", ":", "return", "(", "self", ".", "safety_factor", "*", "self", ".", "q", "/", "self", ".", "vel_critical", ")", ".", "to", "(", "u", ".", "cm", "**", "2", ")" ]
The minimum cross-sectional area of the LFOM pipe that assures a safety factor.
[ "The", "minimum", "cross", "-", "sectional", "area", "of", "the", "LFOM", "pipe", "that", "assures", "a", "safety", "factor", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L67-L70
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.nom_diam_pipe
def nom_diam_pipe(self): """The nominal diameter of the LFOM pipe""" ID = pc.diam_circle(self.area_pipe_min) return pipe.ND_SDR_available(ID, self.sdr)
python
def nom_diam_pipe(self): """The nominal diameter of the LFOM pipe""" ID = pc.diam_circle(self.area_pipe_min) return pipe.ND_SDR_available(ID, self.sdr)
[ "def", "nom_diam_pipe", "(", "self", ")", ":", "ID", "=", "pc", ".", "diam_circle", "(", "self", ".", "area_pipe_min", ")", "return", "pipe", ".", "ND_SDR_available", "(", "ID", ",", "self", ".", "sdr", ")" ]
The nominal diameter of the LFOM pipe
[ "The", "nominal", "diameter", "of", "the", "LFOM", "pipe" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L73-L76
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.area_top_orifice
def area_top_orifice(self): """Estimate the orifice area corresponding to the top row of orifices. Another solution method is to use integration to solve this problem. Here we use the width of the stout weir in the center of the top row to estimate the area of the top orifice """...
python
def area_top_orifice(self): """Estimate the orifice area corresponding to the top row of orifices. Another solution method is to use integration to solve this problem. Here we use the width of the stout weir in the center of the top row to estimate the area of the top orifice """...
[ "def", "area_top_orifice", "(", "self", ")", ":", "# Calculate the center of the top row:", "z", "=", "self", ".", "hl", "-", "0.5", "*", "self", ".", "b_rows", "# Multiply the stout weir width by the height of one row.", "return", "self", ".", "stout_w_per_flow", "(", ...
Estimate the orifice area corresponding to the top row of orifices. Another solution method is to use integration to solve this problem. Here we use the width of the stout weir in the center of the top row to estimate the area of the top orifice
[ "Estimate", "the", "orifice", "area", "corresponding", "to", "the", "top", "row", "of", "orifices", ".", "Another", "solution", "method", "is", "to", "use", "integration", "to", "solve", "this", "problem", ".", "Here", "we", "use", "the", "width", "of", "t...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L79-L88
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.orifice_diameter
def orifice_diameter(self): """The actual orifice diameter. We don't let the diameter extend beyond its row space. """ maxdrill = min(self.b_rows, self.d_orifice_max) return ut.floor_nearest(maxdrill, self.drill_bits)
python
def orifice_diameter(self): """The actual orifice diameter. We don't let the diameter extend beyond its row space. """ maxdrill = min(self.b_rows, self.d_orifice_max) return ut.floor_nearest(maxdrill, self.drill_bits)
[ "def", "orifice_diameter", "(", "self", ")", ":", "maxdrill", "=", "min", "(", "self", ".", "b_rows", ",", "self", ".", "d_orifice_max", ")", "return", "ut", ".", "floor_nearest", "(", "maxdrill", ",", "self", ".", "drill_bits", ")" ]
The actual orifice diameter. We don't let the diameter extend beyond its row space.
[ "The", "actual", "orifice", "diameter", ".", "We", "don", "t", "let", "the", "diameter", "extend", "beyond", "its", "row", "space", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L96-L100
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.n_orifices_per_row_max
def n_orifices_per_row_max(self): """A bound on the number of orifices allowed in each row. The distance between consecutive orifices must be enough to retain structural integrity of the pipe. """ c = math.pi * pipe.ID_SDR(self.nom_diam_pipe, self.sdr) b = self.orifice_di...
python
def n_orifices_per_row_max(self): """A bound on the number of orifices allowed in each row. The distance between consecutive orifices must be enough to retain structural integrity of the pipe. """ c = math.pi * pipe.ID_SDR(self.nom_diam_pipe, self.sdr) b = self.orifice_di...
[ "def", "n_orifices_per_row_max", "(", "self", ")", ":", "c", "=", "math", ".", "pi", "*", "pipe", ".", "ID_SDR", "(", "self", ".", "nom_diam_pipe", ",", "self", ".", "sdr", ")", "b", "=", "self", ".", "orifice_diameter", "+", "self", ".", "s_orifice", ...
A bound on the number of orifices allowed in each row. The distance between consecutive orifices must be enough to retain structural integrity of the pipe.
[ "A", "bound", "on", "the", "number", "of", "orifices", "allowed", "in", "each", "row", ".", "The", "distance", "between", "consecutive", "orifices", "must", "be", "enough", "to", "retain", "structural", "integrity", "of", "the", "pipe", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L108-L116
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.flow_ramp
def flow_ramp(self): """An equally spaced array representing flow at each row.""" return np.linspace(1 / self.n_rows, 1, self.n_rows)*self.q
python
def flow_ramp(self): """An equally spaced array representing flow at each row.""" return np.linspace(1 / self.n_rows, 1, self.n_rows)*self.q
[ "def", "flow_ramp", "(", "self", ")", ":", "return", "np", ".", "linspace", "(", "1", "/", "self", ".", "n_rows", ",", "1", ",", "self", ".", "n_rows", ")", "*", "self", ".", "q" ]
An equally spaced array representing flow at each row.
[ "An", "equally", "spaced", "array", "representing", "flow", "at", "each", "row", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L119-L121
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.height_orifices
def height_orifices(self): """Calculates the height of the center of each row of orifices. The bottom of the bottom row orifices is at the zero elevation point of the LFOM so that the flow goes to zero when the water height is at zero. """ return (np.linspace(0, self.n_r...
python
def height_orifices(self): """Calculates the height of the center of each row of orifices. The bottom of the bottom row orifices is at the zero elevation point of the LFOM so that the flow goes to zero when the water height is at zero. """ return (np.linspace(0, self.n_r...
[ "def", "height_orifices", "(", "self", ")", ":", "return", "(", "np", ".", "linspace", "(", "0", ",", "self", ".", "n_rows", "-", "1", ",", "self", ".", "n_rows", ")", ")", "*", "self", ".", "b_rows", "+", "0.5", "*", "self", ".", "orifice_diameter...
Calculates the height of the center of each row of orifices. The bottom of the bottom row orifices is at the zero elevation point of the LFOM so that the flow goes to zero when the water height is at zero.
[ "Calculates", "the", "height", "of", "the", "center", "of", "each", "row", "of", "orifices", ".", "The", "bottom", "of", "the", "bottom", "row", "orifices", "is", "at", "the", "zero", "elevation", "point", "of", "the", "LFOM", "so", "that", "the", "flow"...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L124-L131
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.flow_actual
def flow_actual(self, Row_Index_Submerged, N_LFOM_Orifices): """Calculates the flow for a given number of submerged rows of orifices harray is the distance from the water level to the center of the orifices when the water is at the max level. Parameters ---------- Row_Ind...
python
def flow_actual(self, Row_Index_Submerged, N_LFOM_Orifices): """Calculates the flow for a given number of submerged rows of orifices harray is the distance from the water level to the center of the orifices when the water is at the max level. Parameters ---------- Row_Ind...
[ "def", "flow_actual", "(", "self", ",", "Row_Index_Submerged", ",", "N_LFOM_Orifices", ")", ":", "flow", "=", "0", "for", "i", "in", "range", "(", "Row_Index_Submerged", "+", "1", ")", ":", "flow", "=", "flow", "+", "(", "N_LFOM_Orifices", "[", "i", "]",...
Calculates the flow for a given number of submerged rows of orifices harray is the distance from the water level to the center of the orifices when the water is at the max level. Parameters ---------- Row_Index_Submerged: int The index of the submerged row. All rows bel...
[ "Calculates", "the", "flow", "for", "a", "given", "number", "of", "submerged", "rows", "of", "orifices", "harray", "is", "the", "distance", "from", "the", "water", "level", "to", "the", "center", "of", "the", "orifices", "when", "the", "water", "is", "at",...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L133-L156
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.n_orifices_per_row
def n_orifices_per_row(self): """Calculate number of orifices at each level given an orifice diameter. """ # H is distance from the bottom of the next row of orifices to the # center of the current row of orifices H = self.b_rows - 0.5*self.orifice_diameter flow_p...
python
def n_orifices_per_row(self): """Calculate number of orifices at each level given an orifice diameter. """ # H is distance from the bottom of the next row of orifices to the # center of the current row of orifices H = self.b_rows - 0.5*self.orifice_diameter flow_p...
[ "def", "n_orifices_per_row", "(", "self", ")", ":", "# H is distance from the bottom of the next row of orifices to the", "# center of the current row of orifices", "H", "=", "self", ".", "b_rows", "-", "0.5", "*", "self", ".", "orifice_diameter", "flow_per_orifice", "=", "...
Calculate number of orifices at each level given an orifice diameter.
[ "Calculate", "number", "of", "orifices", "at", "each", "level", "given", "an", "orifice", "diameter", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L159-L176
AguaClara/aguaclara
aguaclara/design/lfom.py
LFOM.error_per_row
def error_per_row(self): """This function calculates the error of the design based on the differences between the predicted flow rate and the actual flow rate through the LFOM.""" FLOW_lfom_error = np.zeros(self.n_rows) for i in range(self.n_rows): actual_flow = self....
python
def error_per_row(self): """This function calculates the error of the design based on the differences between the predicted flow rate and the actual flow rate through the LFOM.""" FLOW_lfom_error = np.zeros(self.n_rows) for i in range(self.n_rows): actual_flow = self....
[ "def", "error_per_row", "(", "self", ")", ":", "FLOW_lfom_error", "=", "np", ".", "zeros", "(", "self", ".", "n_rows", ")", "for", "i", "in", "range", "(", "self", ".", "n_rows", ")", ":", "actual_flow", "=", "self", ".", "flow_actual", "(", "i", ","...
This function calculates the error of the design based on the differences between the predicted flow rate and the actual flow rate through the LFOM.
[ "This", "function", "calculates", "the", "error", "of", "the", "design", "based", "on", "the", "differences", "between", "the", "predicted", "flow", "rate", "and", "the", "actual", "flow", "rate", "through", "the", "LFOM", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/lfom.py#L179-L187
AguaClara/aguaclara
aguaclara/core/drills.py
get_drill_bits_d_imperial
def get_drill_bits_d_imperial(): """Return array of possible drill diameters in imperial.""" step_32nd = np.arange(0.03125, 0.25, 0.03125) step_8th = np.arange(0.25, 1.0, 0.125) step_4th = np.arange(1.0, 2.0, 0.25) maximum = [2.0] return np.concatenate((step_32nd, ste...
python
def get_drill_bits_d_imperial(): """Return array of possible drill diameters in imperial.""" step_32nd = np.arange(0.03125, 0.25, 0.03125) step_8th = np.arange(0.25, 1.0, 0.125) step_4th = np.arange(1.0, 2.0, 0.25) maximum = [2.0] return np.concatenate((step_32nd, ste...
[ "def", "get_drill_bits_d_imperial", "(", ")", ":", "step_32nd", "=", "np", ".", "arange", "(", "0.03125", ",", "0.25", ",", "0.03125", ")", "step_8th", "=", "np", ".", "arange", "(", "0.25", ",", "1.0", ",", "0.125", ")", "step_4th", "=", "np", ".", ...
Return array of possible drill diameters in imperial.
[ "Return", "array", "of", "possible", "drill", "diameters", "in", "imperial", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/drills.py#L8-L18
AguaClara/aguaclara
aguaclara/core/drills.py
get_drill_bits_d_metric
def get_drill_bits_d_metric(): """Return array of possible drill diameters in metric.""" return np.concatenate((np.arange(1.0, 10.0, 0.1), np.arange(10.0, 18.0, 0.5), np.arange(18.0, 36.0, 1.0), np.arange(40.0, 55.0, 5.0))) * u.mm
python
def get_drill_bits_d_metric(): """Return array of possible drill diameters in metric.""" return np.concatenate((np.arange(1.0, 10.0, 0.1), np.arange(10.0, 18.0, 0.5), np.arange(18.0, 36.0, 1.0), np.arange(40.0, 55.0, 5.0))) * u.mm
[ "def", "get_drill_bits_d_metric", "(", ")", ":", "return", "np", ".", "concatenate", "(", "(", "np", ".", "arange", "(", "1.0", ",", "10.0", ",", "0.1", ")", ",", "np", ".", "arange", "(", "10.0", ",", "18.0", ",", "0.5", ")", ",", "np", ".", "ar...
Return array of possible drill diameters in metric.
[ "Return", "array", "of", "possible", "drill", "diameters", "in", "metric", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/core/drills.py#L21-L26
AguaClara/aguaclara
aguaclara/research/stock_qc.py
Variable_C_Stock.C_stock
def C_stock(self): """Return the required concentration of material in the stock given a reactor's desired system flow rate, system concentration, and stock flow rate. :return: Concentration of material in the stock :rtype: float """ return self._C_sys * (self._Q...
python
def C_stock(self): """Return the required concentration of material in the stock given a reactor's desired system flow rate, system concentration, and stock flow rate. :return: Concentration of material in the stock :rtype: float """ return self._C_sys * (self._Q...
[ "def", "C_stock", "(", "self", ")", ":", "return", "self", ".", "_C_sys", "*", "(", "self", ".", "_Q_sys", "/", "self", ".", "_Q_stock", ")", ".", "to", "(", "u", ".", "dimensionless", ")" ]
Return the required concentration of material in the stock given a reactor's desired system flow rate, system concentration, and stock flow rate. :return: Concentration of material in the stock :rtype: float
[ "Return", "the", "required", "concentration", "of", "material", "in", "the", "stock", "given", "a", "reactor", "s", "desired", "system", "flow", "rate", "system", "concentration", "and", "stock", "flow", "rate", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/stock_qc.py#L77-L85
AguaClara/aguaclara
aguaclara/research/stock_qc.py
Variable_C_Stock.T_stock
def T_stock(self, V_stock): """Return the amount of time at which the stock of materal will be depleted. :param V_stock: Volume of the stock of material :type V_stock: float :return: Time at which the stock will be depleted :rtype: float """ return Stock...
python
def T_stock(self, V_stock): """Return the amount of time at which the stock of materal will be depleted. :param V_stock: Volume of the stock of material :type V_stock: float :return: Time at which the stock will be depleted :rtype: float """ return Stock...
[ "def", "T_stock", "(", "self", ",", "V_stock", ")", ":", "return", "Stock", ".", "T_stock", "(", "self", ",", "V_stock", ",", "self", ".", "_Q_stock", ")", ".", "to", "(", "u", ".", "hr", ")" ]
Return the amount of time at which the stock of materal will be depleted. :param V_stock: Volume of the stock of material :type V_stock: float :return: Time at which the stock will be depleted :rtype: float
[ "Return", "the", "amount", "of", "time", "at", "which", "the", "stock", "of", "materal", "will", "be", "depleted", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/stock_qc.py#L99-L109
AguaClara/aguaclara
aguaclara/research/stock_qc.py
Variable_C_Stock.V_super_stock
def V_super_stock(self, V_stock, C_super_stock): """Return the volume of super (more concentrated) stock that must be diluted for the desired stock volume and required stock concentration. :param V_stock: Volume of the stock of material :type V_stock: float :param C_super_stock:...
python
def V_super_stock(self, V_stock, C_super_stock): """Return the volume of super (more concentrated) stock that must be diluted for the desired stock volume and required stock concentration. :param V_stock: Volume of the stock of material :type V_stock: float :param C_super_stock:...
[ "def", "V_super_stock", "(", "self", ",", "V_stock", ",", "C_super_stock", ")", ":", "return", "Stock", ".", "V_super_stock", "(", "self", ",", "V_stock", ",", "self", ".", "C_stock", "(", ")", ",", "C_super_stock", ")" ]
Return the volume of super (more concentrated) stock that must be diluted for the desired stock volume and required stock concentration. :param V_stock: Volume of the stock of material :type V_stock: float :param C_super_stock: Concentration of the super stock :type C_super_stoc...
[ "Return", "the", "volume", "of", "super", "(", "more", "concentrated", ")", "stock", "that", "must", "be", "diluted", "for", "the", "desired", "stock", "volume", "and", "required", "stock", "concentration", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/stock_qc.py#L123-L135
AguaClara/aguaclara
aguaclara/research/stock_qc.py
Variable_Q_Stock.Q_stock
def Q_stock(self): """Return the required flow rate from the stock of material given a reactor's desired system flow rate, system concentration, and stock concentration. :return: Flow rate from the stock of material :rtype: float """ return self._Q_sys * (self._C...
python
def Q_stock(self): """Return the required flow rate from the stock of material given a reactor's desired system flow rate, system concentration, and stock concentration. :return: Flow rate from the stock of material :rtype: float """ return self._Q_sys * (self._C...
[ "def", "Q_stock", "(", "self", ")", ":", "return", "self", ".", "_Q_sys", "*", "(", "self", ".", "_C_sys", "/", "self", ".", "_C_stock", ")", ".", "to", "(", "u", ".", "dimensionless", ")" ]
Return the required flow rate from the stock of material given a reactor's desired system flow rate, system concentration, and stock concentration. :return: Flow rate from the stock of material :rtype: float
[ "Return", "the", "required", "flow", "rate", "from", "the", "stock", "of", "material", "given", "a", "reactor", "s", "desired", "system", "flow", "rate", "system", "concentration", "and", "stock", "concentration", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/stock_qc.py#L203-L211
AguaClara/aguaclara
aguaclara/research/stock_qc.py
Variable_Q_Stock.rpm
def rpm(self, vol_per_rev): """Return the pump speed required for the reactor's stock of material given the volume of fluid output per revolution by the stock's pump. :param vol_per_rev: Volume of fluid pumped per revolution (dependent on pump and tubing) :type vol_per_rev: float ...
python
def rpm(self, vol_per_rev): """Return the pump speed required for the reactor's stock of material given the volume of fluid output per revolution by the stock's pump. :param vol_per_rev: Volume of fluid pumped per revolution (dependent on pump and tubing) :type vol_per_rev: float ...
[ "def", "rpm", "(", "self", ",", "vol_per_rev", ")", ":", "return", "Stock", ".", "rpm", "(", "self", ",", "vol_per_rev", ",", "self", ".", "Q_stock", "(", ")", ")", ".", "to", "(", "u", ".", "rev", "/", "u", ".", "min", ")" ]
Return the pump speed required for the reactor's stock of material given the volume of fluid output per revolution by the stock's pump. :param vol_per_rev: Volume of fluid pumped per revolution (dependent on pump and tubing) :type vol_per_rev: float :return: Pump speed for the material...
[ "Return", "the", "pump", "speed", "required", "for", "the", "reactor", "s", "stock", "of", "material", "given", "the", "volume", "of", "fluid", "output", "per", "revolution", "by", "the", "stock", "s", "pump", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/stock_qc.py#L213-L223
AguaClara/aguaclara
aguaclara/research/stock_qc.py
Variable_Q_Stock.T_stock
def T_stock(self, V_stock): """Return the amount of time at which the stock of materal will be depleted. :param V_stock: Volume of the stock of material :type V_stock: float :return: Time at which the stock will be depleted :rtype: float """ return Stock...
python
def T_stock(self, V_stock): """Return the amount of time at which the stock of materal will be depleted. :param V_stock: Volume of the stock of material :type V_stock: float :return: Time at which the stock will be depleted :rtype: float """ return Stock...
[ "def", "T_stock", "(", "self", ",", "V_stock", ")", ":", "return", "Stock", ".", "T_stock", "(", "self", ",", "V_stock", ",", "self", ".", "Q_stock", "(", ")", ")", ".", "to", "(", "u", ".", "hr", ")" ]
Return the amount of time at which the stock of materal will be depleted. :param V_stock: Volume of the stock of material :type V_stock: float :return: Time at which the stock will be depleted :rtype: float
[ "Return", "the", "amount", "of", "time", "at", "which", "the", "stock", "of", "materal", "will", "be", "depleted", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/stock_qc.py#L225-L235
AguaClara/aguaclara
aguaclara/research/stock_qc.py
Variable_Q_Stock.V_super_stock
def V_super_stock(self, V_stock, C_super_stock): """Return the volume of super (more concentrated) stock that must be diluted for the desired stock volume and stock concentration. :param V_stock: Volume of the stock of material :type V_stock: float :param C_super_stock: Concentr...
python
def V_super_stock(self, V_stock, C_super_stock): """Return the volume of super (more concentrated) stock that must be diluted for the desired stock volume and stock concentration. :param V_stock: Volume of the stock of material :type V_stock: float :param C_super_stock: Concentr...
[ "def", "V_super_stock", "(", "self", ",", "V_stock", ",", "C_super_stock", ")", ":", "return", "Stock", ".", "V_super_stock", "(", "self", ",", "V_stock", ",", "self", ".", "_C_stock", ",", "C_super_stock", ")" ]
Return the volume of super (more concentrated) stock that must be diluted for the desired stock volume and stock concentration. :param V_stock: Volume of the stock of material :type V_stock: float :param C_super_stock: Concentration of the super stock :type C_super_stock: float ...
[ "Return", "the", "volume", "of", "super", "(", "more", "concentrated", ")", "stock", "that", "must", "be", "diluted", "for", "the", "desired", "stock", "volume", "and", "stock", "concentration", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/stock_qc.py#L249-L261
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.vel_grad_avg
def vel_grad_avg(self): """Calculate the average velocity gradient (G-bar) of water flowing through the flocculator. :returns: Average velocity gradient (G-bar) :rtype: float * 1 / second """ return ((u.standard_gravity * self.HL) / (pc.viscosity_kinematic(...
python
def vel_grad_avg(self): """Calculate the average velocity gradient (G-bar) of water flowing through the flocculator. :returns: Average velocity gradient (G-bar) :rtype: float * 1 / second """ return ((u.standard_gravity * self.HL) / (pc.viscosity_kinematic(...
[ "def", "vel_grad_avg", "(", "self", ")", ":", "return", "(", "(", "u", ".", "standard_gravity", "*", "self", ".", "HL", ")", "/", "(", "pc", ".", "viscosity_kinematic", "(", "self", ".", "temp", ")", "*", "self", ".", "Gt", ")", ")", ".", "to", "...
Calculate the average velocity gradient (G-bar) of water flowing through the flocculator. :returns: Average velocity gradient (G-bar) :rtype: float * 1 / second
[ "Calculate", "the", "average", "velocity", "gradient", "(", "G", "-", "bar", ")", "of", "water", "flowing", "through", "the", "flocculator", ".", ":", "returns", ":", "Average", "velocity", "gradient", "(", "G", "-", "bar", ")", ":", "rtype", ":", "float...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L103-L110
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.W_min_HS_ratio
def W_min_HS_ratio(self): """Calculate the minimum flocculator channel width, given the minimum ratio between expansion height (H) and baffle spacing (S). :returns: Minimum channel width given H_e/S :rtype: float * centimeter """ return ((self.HS_RATIO_MIN * self.Q / self...
python
def W_min_HS_ratio(self): """Calculate the minimum flocculator channel width, given the minimum ratio between expansion height (H) and baffle spacing (S). :returns: Minimum channel width given H_e/S :rtype: float * centimeter """ return ((self.HS_RATIO_MIN * self.Q / self...
[ "def", "W_min_HS_ratio", "(", "self", ")", ":", "return", "(", "(", "self", ".", "HS_RATIO_MIN", "*", "self", ".", "Q", "/", "self", ".", "downstream_H", ")", "*", "(", "self", ".", "BAFFLE_K", "/", "(", "2", "*", "self", ".", "downstream_H", "*", ...
Calculate the minimum flocculator channel width, given the minimum ratio between expansion height (H) and baffle spacing (S). :returns: Minimum channel width given H_e/S :rtype: float * centimeter
[ "Calculate", "the", "minimum", "flocculator", "channel", "width", "given", "the", "minimum", "ratio", "between", "expansion", "height", "(", "H", ")", "and", "baffle", "spacing", "(", "S", ")", ".", ":", "returns", ":", "Minimum", "channel", "width", "given"...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L129-L138
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.channel_n
def channel_n(self): """Calculate the minimum number of channels based on the maximum possible channel width and the maximum length of the channels. Round up to the next even number (factor of 2 shows up twice in equation) The channel width must be greater than the hydraulic width that e...
python
def channel_n(self): """Calculate the minimum number of channels based on the maximum possible channel width and the maximum length of the channels. Round up to the next even number (factor of 2 shows up twice in equation) The channel width must be greater than the hydraulic width that e...
[ "def", "channel_n", "(", "self", ")", ":", "min_hydraulic_W", "=", "np", ".", "amax", "(", "np", ".", "array", "(", "[", "1", ",", "(", "self", ".", "max_W", "/", "self", ".", "W_min_HS_ratio", ")", ".", "to", "(", "u", ".", "dimensionless", ")", ...
Calculate the minimum number of channels based on the maximum possible channel width and the maximum length of the channels. Round up to the next even number (factor of 2 shows up twice in equation) The channel width must be greater than the hydraulic width that ensure baffle overlap. Ba...
[ "Calculate", "the", "minimum", "number", "of", "channels", "based", "on", "the", "maximum", "possible", "channel", "width", "and", "the", "maximum", "length", "of", "the", "channels", ".", "Round", "up", "to", "the", "next", "even", "number", "(", "factor", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L141-L154
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.channel_W
def channel_W(self): """ The minimum and hence optimal channel width of the flocculator. This The channel must be - wide enough to meet the volume requirement (channel_est_W) - wider than human access for construction - wider than hydraulic requirement to meet H/S...
python
def channel_W(self): """ The minimum and hence optimal channel width of the flocculator. This The channel must be - wide enough to meet the volume requirement (channel_est_W) - wider than human access for construction - wider than hydraulic requirement to meet H/S...
[ "def", "channel_W", "(", "self", ")", ":", "channel_est_W", "=", "(", "self", ".", "vol", "/", "(", "self", ".", "downstream_H", "*", "(", "self", ".", "channel_n", "*", "self", ".", "max_L", "-", "self", ".", "ent_tank_L", ")", ")", ")", ".", "to"...
The minimum and hence optimal channel width of the flocculator. This The channel must be - wide enough to meet the volume requirement (channel_est_W) - wider than human access for construction - wider than hydraulic requirement to meet H/S ratio Create a dimensionless arr...
[ "The", "minimum", "and", "hence", "optimal", "channel", "width", "of", "the", "flocculator", ".", "This", "The", "channel", "must", "be", "-", "wide", "enough", "to", "meet", "the", "volume", "requirement", "(", "channel_est_W", ")", "-", "wider", "than", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L157-L175
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.channel_L
def channel_L(self): """ The channel length of the flocculator. If ha.HUMAN_W_MIN or W_min_HS_ratio is the defining constraint for the flocculator width, then the flocculator volume will be greater than necessary. Bring the volume back to the design volume by shortening the flocc...
python
def channel_L(self): """ The channel length of the flocculator. If ha.HUMAN_W_MIN or W_min_HS_ratio is the defining constraint for the flocculator width, then the flocculator volume will be greater than necessary. Bring the volume back to the design volume by shortening the flocc...
[ "def", "channel_L", "(", "self", ")", ":", "channel_L", "=", "(", "(", "self", ".", "vol", "/", "(", "self", ".", "channel_W", "*", "self", ".", "downstream_H", ")", "+", "self", ".", "ent_tank_L", ")", "/", "self", ".", "channel_n", ")", ".", "to"...
The channel length of the flocculator. If ha.HUMAN_W_MIN or W_min_HS_ratio is the defining constraint for the flocculator width, then the flocculator volume will be greater than necessary. Bring the volume back to the design volume by shortening the flocculator in this case. This design approach...
[ "The", "channel", "length", "of", "the", "flocculator", ".", "If", "ha", ".", "HUMAN_W_MIN", "or", "W_min_HS_ratio", "is", "the", "defining", "constraint", "for", "the", "flocculator", "width", "then", "the", "flocculator", "volume", "will", "be", "greater", "...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L178-L192
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.expansion_max_H
def expansion_max_H(self): """"Return the maximum distance between expansions for the largest allowable H/S ratio. :returns: Maximum expansion distance :rtype: float * meter Examples -------- exp_dist_max(20*u.L/u.s, 40*u.cm, 37000, 25*u.degC, 2*u.m) 0.375...
python
def expansion_max_H(self): """"Return the maximum distance between expansions for the largest allowable H/S ratio. :returns: Maximum expansion distance :rtype: float * meter Examples -------- exp_dist_max(20*u.L/u.s, 40*u.cm, 37000, 25*u.degC, 2*u.m) 0.375...
[ "def", "expansion_max_H", "(", "self", ")", ":", "return", "(", "(", "(", "self", ".", "BAFFLE_K", "/", "(", "2", "*", "pc", ".", "viscosity_kinematic", "(", "self", ".", "temp", ")", "*", "(", "self", ".", "vel_grad_avg", "**", "2", ")", ")", ")",...
Return the maximum distance between expansions for the largest allowable H/S ratio. :returns: Maximum expansion distance :rtype: float * meter Examples -------- exp_dist_max(20*u.L/u.s, 40*u.cm, 37000, 25*u.degC, 2*u.m) 0.375 meter
[ "Return", "the", "maximum", "distance", "between", "expansions", "for", "the", "largest", "allowable", "H", "/", "S", "ratio", ".", ":", "returns", ":", "Maximum", "expansion", "distance", ":", "rtype", ":", "float", "*", "meter", "Examples", "--------", "ex...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L195-L206
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.baffle_S
def baffle_S(self): """Return the spacing between baffles. :returns: Spacing between baffles :rtype: int """ return ((self.BAFFLE_K / ((2 * self.expansion_H * (self.vel_grad_avg ** 2) * pc.viscosity_kinematic(self.temp))).to_base_units()) ** (1/3)...
python
def baffle_S(self): """Return the spacing between baffles. :returns: Spacing between baffles :rtype: int """ return ((self.BAFFLE_K / ((2 * self.expansion_H * (self.vel_grad_avg ** 2) * pc.viscosity_kinematic(self.temp))).to_base_units()) ** (1/3)...
[ "def", "baffle_S", "(", "self", ")", ":", "return", "(", "(", "self", ".", "BAFFLE_K", "/", "(", "(", "2", "*", "self", ".", "expansion_H", "*", "(", "self", ".", "vel_grad_avg", "**", "2", ")", "*", "pc", ".", "viscosity_kinematic", "(", "self", "...
Return the spacing between baffles. :returns: Spacing between baffles :rtype: int
[ "Return", "the", "spacing", "between", "baffles", ".", ":", "returns", ":", "Spacing", "between", "baffles", ":", "rtype", ":", "int" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L225-L233
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.drain_K
def drain_K(self): """ Return the minor loss coefficient of the drain pipe. :returns: Minor Loss Coefficient :return: float """ drain_K = minorloss.PIPE_ENTRANCE_K_MINOR + minorloss.PIPE_ENTRANCE_K_MINOR + minorloss.PIPE_EXIT_K_MINOR return drain_K
python
def drain_K(self): """ Return the minor loss coefficient of the drain pipe. :returns: Minor Loss Coefficient :return: float """ drain_K = minorloss.PIPE_ENTRANCE_K_MINOR + minorloss.PIPE_ENTRANCE_K_MINOR + minorloss.PIPE_EXIT_K_MINOR return drain_K
[ "def", "drain_K", "(", "self", ")", ":", "drain_K", "=", "minorloss", ".", "PIPE_ENTRANCE_K_MINOR", "+", "minorloss", ".", "PIPE_ENTRANCE_K_MINOR", "+", "minorloss", ".", "PIPE_EXIT_K_MINOR", "return", "drain_K" ]
Return the minor loss coefficient of the drain pipe. :returns: Minor Loss Coefficient :return: float
[ "Return", "the", "minor", "loss", "coefficient", "of", "the", "drain", "pipe", ".", ":", "returns", ":", "Minor", "Loss", "Coefficient", ":", "return", ":", "float" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L244-L250
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.drain_D
def drain_D(self): """ Returns depth of drain pipe. :returns: Depth :return: float """ tank_A = 2 * self.channel_L * self.channel_W drain_D = (np.sqrt(8 * tank_A / (np.pi * self.drain_t) * np.sqrt( self.downstream_H * self.drain_K / (2 * u.standard_gravity))))....
python
def drain_D(self): """ Returns depth of drain pipe. :returns: Depth :return: float """ tank_A = 2 * self.channel_L * self.channel_W drain_D = (np.sqrt(8 * tank_A / (np.pi * self.drain_t) * np.sqrt( self.downstream_H * self.drain_K / (2 * u.standard_gravity))))....
[ "def", "drain_D", "(", "self", ")", ":", "tank_A", "=", "2", "*", "self", ".", "channel_L", "*", "self", ".", "channel_W", "drain_D", "=", "(", "np", ".", "sqrt", "(", "8", "*", "tank_A", "/", "(", "np", ".", "pi", "*", "self", ".", "drain_t", ...
Returns depth of drain pipe. :returns: Depth :return: float
[ "Returns", "depth", "of", "drain", "pipe", ".", ":", "returns", ":", "Depth", ":", "return", ":", "float" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L253-L261
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.drain_ND
def drain_ND(self): """Returns the diameter of the drain pipe. Each drain pipe will drain two channels because channels are connected by a port at the far end and the first channel can't have a drain because of the entrance tank. Need to review the design to see if this is a good ...
python
def drain_ND(self): """Returns the diameter of the drain pipe. Each drain pipe will drain two channels because channels are connected by a port at the far end and the first channel can't have a drain because of the entrance tank. Need to review the design to see if this is a good ...
[ "def", "drain_ND", "(", "self", ")", ":", "drain_ND", "=", "pipes", ".", "ND_SDR_available", "(", "self", ".", "drain_D", ",", "self", ".", "SDR", ")", "return", "drain_ND" ]
Returns the diameter of the drain pipe. Each drain pipe will drain two channels because channels are connected by a port at the far end and the first channel can't have a drain because of the entrance tank. Need to review the design to see if this is a good assumption. D_{Pipe} =...
[ "Returns", "the", "diameter", "of", "the", "drain", "pipe", ".", "Each", "drain", "pipe", "will", "drain", "two", "channels", "because", "channels", "are", "connected", "by", "a", "port", "at", "the", "far", "end", "and", "the", "first", "channel", "can", ...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L264-L275
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.design
def design(self): """Returns the designed values. :returns: list of designed values (G, t, channel_W, obstacle_n) :rtype: int """ floc_dict = {'channel_n': self.channel_n, 'channel_L': self.channel_L, 'channel_W': self.channel_W, ...
python
def design(self): """Returns the designed values. :returns: list of designed values (G, t, channel_W, obstacle_n) :rtype: int """ floc_dict = {'channel_n': self.channel_n, 'channel_L': self.channel_L, 'channel_W': self.channel_W, ...
[ "def", "design", "(", "self", ")", ":", "floc_dict", "=", "{", "'channel_n'", ":", "self", ".", "channel_n", ",", "'channel_L'", ":", "self", ".", "channel_L", ",", "'channel_W'", ":", "self", ".", "channel_W", ",", "'baffle_S'", ":", "self", ".", "baffl...
Returns the designed values. :returns: list of designed values (G, t, channel_W, obstacle_n) :rtype: int
[ "Returns", "the", "designed", "values", ".", ":", "returns", ":", "list", "of", "designed", "values", "(", "G", "t", "channel_W", "obstacle_n", ")", ":", "rtype", ":", "int" ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L278-L292
AguaClara/aguaclara
aguaclara/design/floc.py
Flocculator.draw
def draw(self): """Draw the Onshape flocculator model based off of this object.""" from onshapepy import Part CAD = Part( 'https://cad.onshape.com/documents/b4cfd328713460beeb3125ac/w/3928b5c91bb0a0be7858d99e/e/6f2eeada21e494cebb49515f' ) CAD.params = { 'c...
python
def draw(self): """Draw the Onshape flocculator model based off of this object.""" from onshapepy import Part CAD = Part( 'https://cad.onshape.com/documents/b4cfd328713460beeb3125ac/w/3928b5c91bb0a0be7858d99e/e/6f2eeada21e494cebb49515f' ) CAD.params = { 'c...
[ "def", "draw", "(", "self", ")", ":", "from", "onshapepy", "import", "Part", "CAD", "=", "Part", "(", "'https://cad.onshape.com/documents/b4cfd328713460beeb3125ac/w/3928b5c91bb0a0be7858d99e/e/6f2eeada21e494cebb49515f'", ")", "CAD", ".", "params", "=", "{", "'channel_L'", ...
Draw the Onshape flocculator model based off of this object.
[ "Draw", "the", "Onshape", "flocculator", "model", "based", "off", "of", "this", "object", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/floc.py#L294-L306
AguaClara/aguaclara
aguaclara/design/cdc.py
viscosity_kinematic_alum
def viscosity_kinematic_alum(conc_alum, temp): """Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. This function assumes that the temperature dependence can be explained ...
python
def viscosity_kinematic_alum(conc_alum, temp): """Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. This function assumes that the temperature dependence can be explained ...
[ "def", "viscosity_kinematic_alum", "(", "conc_alum", ",", "temp", ")", ":", "nu", "=", "(", "1", "+", "(", "4.255", "*", "10", "**", "-", "6", ")", "*", "conc_alum", "**", "2.289", ")", "*", "pc", ".", "viscosity_kinematic", "(", "temp", ")", ".", ...
Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. This function assumes that the temperature dependence can be explained based on the effect on water and that there is no ...
[ "Return", "the", "dynamic", "viscosity", "of", "water", "at", "a", "given", "temperature", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/cdc.py#L33-L43
AguaClara/aguaclara
aguaclara/design/cdc.py
viscosity_kinematic_pacl
def viscosity_kinematic_pacl(conc_pacl, temp): """Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. This function assumes that the temperature dependence can be explained ...
python
def viscosity_kinematic_pacl(conc_pacl, temp): """Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. This function assumes that the temperature dependence can be explained ...
[ "def", "viscosity_kinematic_pacl", "(", "conc_pacl", ",", "temp", ")", ":", "nu", "=", "(", "1", "+", "(", "2.383", "*", "10", "**", "-", "5", ")", "*", "conc_pacl", "**", "1.893", ")", "*", "pc", ".", "viscosity_kinematic", "(", "temp", ")", ".", ...
Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. This function assumes that the temperature dependence can be explained based on the effect on water and that there is no ...
[ "Return", "the", "dynamic", "viscosity", "of", "water", "at", "a", "given", "temperature", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/cdc.py#L47-L57
AguaClara/aguaclara
aguaclara/design/cdc.py
viscosity_kinematic_chem
def viscosity_kinematic_chem(conc_chem, temp, en_chem): """Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. """ if en_chem == 0: nu = viscosity_kinematic_a...
python
def viscosity_kinematic_chem(conc_chem, temp, en_chem): """Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin. """ if en_chem == 0: nu = viscosity_kinematic_a...
[ "def", "viscosity_kinematic_chem", "(", "conc_chem", ",", "temp", ",", "en_chem", ")", ":", "if", "en_chem", "==", "0", ":", "nu", "=", "viscosity_kinematic_alum", "(", "conc_chem", ",", "temp", ")", ".", "magnitude", "if", "en_chem", "==", "1", ":", "nu",...
Return the dynamic viscosity of water at a given temperature. If given units, the function will automatically convert to Kelvin. If not given units, the function will assume Kelvin.
[ "Return", "the", "dynamic", "viscosity", "of", "water", "at", "a", "given", "temperature", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/cdc.py#L61-L73
AguaClara/aguaclara
aguaclara/design/cdc.py
max_linear_flow
def max_linear_flow(Diam, HeadlossCDC, Ratio_Error, KMinor): """Return the maximum flow that will meet the linear requirement. Maximum flow that can be put through a tube of a given diameter without exceeding the allowable deviation from linear head loss behavior """ flow = (pc.area_circle(Diam)).ma...
python
def max_linear_flow(Diam, HeadlossCDC, Ratio_Error, KMinor): """Return the maximum flow that will meet the linear requirement. Maximum flow that can be put through a tube of a given diameter without exceeding the allowable deviation from linear head loss behavior """ flow = (pc.area_circle(Diam)).ma...
[ "def", "max_linear_flow", "(", "Diam", ",", "HeadlossCDC", ",", "Ratio_Error", ",", "KMinor", ")", ":", "flow", "=", "(", "pc", ".", "area_circle", "(", "Diam", ")", ")", ".", "magnitude", "*", "np", ".", "sqrt", "(", "(", "2", "*", "Ratio_Error", "*...
Return the maximum flow that will meet the linear requirement. Maximum flow that can be put through a tube of a given diameter without exceeding the allowable deviation from linear head loss behavior
[ "Return", "the", "maximum", "flow", "that", "will", "meet", "the", "linear", "requirement", ".", "Maximum", "flow", "that", "can", "be", "put", "through", "a", "tube", "of", "a", "given", "diameter", "without", "exceeding", "the", "allowable", "deviation", "...
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/cdc.py#L84-L90
AguaClara/aguaclara
aguaclara/design/cdc.py
_len_tube
def _len_tube(Flow, Diam, HeadLoss, conc_chem, temp, en_chem, KMinor): """Length of tube required to get desired head loss at maximum flow based on the Hagen-Poiseuille equation.""" num1 = pc.gravity.magnitude * HeadLoss * np.pi * (Diam**4) denom1 = 128 * viscosity_kinematic_chem(conc_chem, temp, en_che...
python
def _len_tube(Flow, Diam, HeadLoss, conc_chem, temp, en_chem, KMinor): """Length of tube required to get desired head loss at maximum flow based on the Hagen-Poiseuille equation.""" num1 = pc.gravity.magnitude * HeadLoss * np.pi * (Diam**4) denom1 = 128 * viscosity_kinematic_chem(conc_chem, temp, en_che...
[ "def", "_len_tube", "(", "Flow", ",", "Diam", ",", "HeadLoss", ",", "conc_chem", ",", "temp", ",", "en_chem", ",", "KMinor", ")", ":", "num1", "=", "pc", ".", "gravity", ".", "magnitude", "*", "HeadLoss", "*", "np", ".", "pi", "*", "(", "Diam", "**...
Length of tube required to get desired head loss at maximum flow based on the Hagen-Poiseuille equation.
[ "Length", "of", "tube", "required", "to", "get", "desired", "head", "loss", "at", "maximum", "flow", "based", "on", "the", "Hagen", "-", "Poiseuille", "equation", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/cdc.py#L102-L110
AguaClara/aguaclara
aguaclara/design/cdc.py
_length_cdc_tube_array
def _length_cdc_tube_array(FlowPlant, ConcDoseMax, ConcStock, DiamTubeAvail, HeadlossCDC, temp, en_chem, KMinor): """Calculate the length of each diameter tube given the corresponding flow rate and coagulant. Choose the tube that is shorter than the maximum length tube.""" Flow =...
python
def _length_cdc_tube_array(FlowPlant, ConcDoseMax, ConcStock, DiamTubeAvail, HeadlossCDC, temp, en_chem, KMinor): """Calculate the length of each diameter tube given the corresponding flow rate and coagulant. Choose the tube that is shorter than the maximum length tube.""" Flow =...
[ "def", "_length_cdc_tube_array", "(", "FlowPlant", ",", "ConcDoseMax", ",", "ConcStock", ",", "DiamTubeAvail", ",", "HeadlossCDC", ",", "temp", ",", "en_chem", ",", "KMinor", ")", ":", "Flow", "=", "_flow_cdc_tube", "(", "FlowPlant", ",", "ConcDoseMax", ",", "...
Calculate the length of each diameter tube given the corresponding flow rate and coagulant. Choose the tube that is shorter than the maximum length tube.
[ "Calculate", "the", "length", "of", "each", "diameter", "tube", "given", "the", "corresponding", "flow", "rate", "and", "coagulant", ".", "Choose", "the", "tube", "that", "is", "shorter", "than", "the", "maximum", "length", "tube", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/cdc.py#L148-L156
AguaClara/aguaclara
aguaclara/design/cdc.py
len_cdc_tube
def len_cdc_tube(FlowPlant, ConcDoseMax, ConcStock, DiamTubeAvail, HeadlossCDC, LenCDCTubeMax, temp, en_chem, KMinor): """The length of tubing may be longer than the max specified if the stock concentration is too high to give a viable solution with the specified length of tub...
python
def len_cdc_tube(FlowPlant, ConcDoseMax, ConcStock, DiamTubeAvail, HeadlossCDC, LenCDCTubeMax, temp, en_chem, KMinor): """The length of tubing may be longer than the max specified if the stock concentration is too high to give a viable solution with the specified length of tub...
[ "def", "len_cdc_tube", "(", "FlowPlant", ",", "ConcDoseMax", ",", "ConcStock", ",", "DiamTubeAvail", ",", "HeadlossCDC", ",", "LenCDCTubeMax", ",", "temp", ",", "en_chem", ",", "KMinor", ")", ":", "index", "=", "i_cdc", "(", "FlowPlant", ",", "ConcDoseMax", ...
The length of tubing may be longer than the max specified if the stock concentration is too high to give a viable solution with the specified length of tubing.
[ "The", "length", "of", "tubing", "may", "be", "longer", "than", "the", "max", "specified", "if", "the", "stock", "concentration", "is", "too", "high", "to", "give", "a", "viable", "solution", "with", "the", "specified", "length", "of", "tubing", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/design/cdc.py#L186-L199
AguaClara/aguaclara
aguaclara/research/floc_model.py
dens_alum_nanocluster
def dens_alum_nanocluster(coag): """Return the density of the aluminum in the nanocluster. This is useful for determining the volume of nanoclusters given a concentration of aluminum. """ density = (coag.PrecipDensity * MOLEC_WEIGHT_ALUMINUM * coag.PrecipAluminumMPM / coag.PrecipMole...
python
def dens_alum_nanocluster(coag): """Return the density of the aluminum in the nanocluster. This is useful for determining the volume of nanoclusters given a concentration of aluminum. """ density = (coag.PrecipDensity * MOLEC_WEIGHT_ALUMINUM * coag.PrecipAluminumMPM / coag.PrecipMole...
[ "def", "dens_alum_nanocluster", "(", "coag", ")", ":", "density", "=", "(", "coag", ".", "PrecipDensity", "*", "MOLEC_WEIGHT_ALUMINUM", "*", "coag", ".", "PrecipAluminumMPM", "/", "coag", ".", "PrecipMolecWeight", ")", "return", "density" ]
Return the density of the aluminum in the nanocluster. This is useful for determining the volume of nanoclusters given a concentration of aluminum.
[ "Return", "the", "density", "of", "the", "aluminum", "in", "the", "nanocluster", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/floc_model.py#L128-L136
AguaClara/aguaclara
aguaclara/research/floc_model.py
dens_pacl_solution
def dens_pacl_solution(ConcAluminum, temp): """Return the density of the PACl solution. From Stock Tank Mixing report Fall 2013: https://confluence.cornell.edu/download/attachments/137953883/20131213_Research_Report.pdf """ return ((0.492 * ConcAluminum * PACl.MolecWeight / (PACl.Alumi...
python
def dens_pacl_solution(ConcAluminum, temp): """Return the density of the PACl solution. From Stock Tank Mixing report Fall 2013: https://confluence.cornell.edu/download/attachments/137953883/20131213_Research_Report.pdf """ return ((0.492 * ConcAluminum * PACl.MolecWeight / (PACl.Alumi...
[ "def", "dens_pacl_solution", "(", "ConcAluminum", ",", "temp", ")", ":", "return", "(", "(", "0.492", "*", "ConcAluminum", "*", "PACl", ".", "MolecWeight", "/", "(", "PACl", ".", "AluminumMPM", "*", "MOLEC_WEIGHT_ALUMINUM", ")", ")", "+", "pc", ".", "densi...
Return the density of the PACl solution. From Stock Tank Mixing report Fall 2013: https://confluence.cornell.edu/download/attachments/137953883/20131213_Research_Report.pdf
[ "Return", "the", "density", "of", "the", "PACl", "solution", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/floc_model.py#L140-L149
AguaClara/aguaclara
aguaclara/research/floc_model.py
particle_number_concentration
def particle_number_concentration(ConcMat, material): """Return the number of particles in suspension. :param ConcMat: Concentration of the material :type ConcMat: float :param material: The material in solution :type material: floc_model.Material """ return ConcMat.to(material.Density.unit...
python
def particle_number_concentration(ConcMat, material): """Return the number of particles in suspension. :param ConcMat: Concentration of the material :type ConcMat: float :param material: The material in solution :type material: floc_model.Material """ return ConcMat.to(material.Density.unit...
[ "def", "particle_number_concentration", "(", "ConcMat", ",", "material", ")", ":", "return", "ConcMat", ".", "to", "(", "material", ".", "Density", ".", "units", ")", "/", "(", "(", "material", ".", "Density", "*", "np", ".", "pi", "*", "material", ".", ...
Return the number of particles in suspension. :param ConcMat: Concentration of the material :type ConcMat: float :param material: The material in solution :type material: floc_model.Material
[ "Return", "the", "number", "of", "particles", "in", "suspension", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/floc_model.py#L194-L202
AguaClara/aguaclara
aguaclara/research/floc_model.py
sep_dist_clay
def sep_dist_clay(ConcClay, material): """Return the separation distance between clay particles.""" return ((material.Density/ConcClay)*((np.pi * material.Diameter ** 3)/6))**(1/3)
python
def sep_dist_clay(ConcClay, material): """Return the separation distance between clay particles.""" return ((material.Density/ConcClay)*((np.pi * material.Diameter ** 3)/6))**(1/3)
[ "def", "sep_dist_clay", "(", "ConcClay", ",", "material", ")", ":", "return", "(", "(", "material", ".", "Density", "/", "ConcClay", ")", "*", "(", "(", "np", ".", "pi", "*", "material", ".", "Diameter", "**", "3", ")", "/", "6", ")", ")", "**", ...
Return the separation distance between clay particles.
[ "Return", "the", "separation", "distance", "between", "clay", "particles", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/floc_model.py#L206-L209
AguaClara/aguaclara
aguaclara/research/floc_model.py
num_nanoclusters
def num_nanoclusters(ConcAluminum, coag): """Return the number of Aluminum nanoclusters.""" return (ConcAluminum / (dens_alum_nanocluster(coag).magnitude * np.pi * coag.Diameter**3))
python
def num_nanoclusters(ConcAluminum, coag): """Return the number of Aluminum nanoclusters.""" return (ConcAluminum / (dens_alum_nanocluster(coag).magnitude * np.pi * coag.Diameter**3))
[ "def", "num_nanoclusters", "(", "ConcAluminum", ",", "coag", ")", ":", "return", "(", "ConcAluminum", "/", "(", "dens_alum_nanocluster", "(", "coag", ")", ".", "magnitude", "*", "np", ".", "pi", "*", "coag", ".", "Diameter", "**", "3", ")", ")" ]
Return the number of Aluminum nanoclusters.
[ "Return", "the", "number", "of", "Aluminum", "nanoclusters", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/floc_model.py#L213-L216
AguaClara/aguaclara
aguaclara/research/floc_model.py
frac_vol_floc_initial
def frac_vol_floc_initial(ConcAluminum, ConcClay, coag, material): """Return the volume fraction of flocs initially present, accounting for both suspended particles and coagulant precipitates. :param ConcAluminum: Concentration of aluminum in solution :type ConcAluminum: float :param ConcClay: Concentr...
python
def frac_vol_floc_initial(ConcAluminum, ConcClay, coag, material): """Return the volume fraction of flocs initially present, accounting for both suspended particles and coagulant precipitates. :param ConcAluminum: Concentration of aluminum in solution :type ConcAluminum: float :param ConcClay: Concentr...
[ "def", "frac_vol_floc_initial", "(", "ConcAluminum", ",", "ConcClay", ",", "coag", ",", "material", ")", ":", "return", "(", "(", "conc_precipitate", "(", "ConcAluminum", ",", "coag", ")", ".", "magnitude", "/", "coag", ".", "PrecipDensity", ")", "+", "(", ...
Return the volume fraction of flocs initially present, accounting for both suspended particles and coagulant precipitates. :param ConcAluminum: Concentration of aluminum in solution :type ConcAluminum: float :param ConcClay: Concentration of particle in suspension :type ConcClay: float :param coag:...
[ "Return", "the", "volume", "fraction", "of", "flocs", "initially", "present", "accounting", "for", "both", "suspended", "particles", "and", "coagulant", "precipitates", "." ]
train
https://github.com/AguaClara/aguaclara/blob/8dd4e734768b166a7fc2b60388a24df2f93783fc/aguaclara/research/floc_model.py#L219-L235