BioSANS2020.propagation.symbolic.analytical_sol
¶
This module is the analytical_sol module
This module handles analytical expression derivation
The following are the functions in this module
solve_with_timeout
get_sets
grab_steady_state
cs_to_csr
analyt_soln
Module Contents¶
Functions¶
|
resturn solution to the system of equation in f_e with variables |
|
[summary] |
|
This function return steady state amounts of components |
|
[summary] |
|
This function finds an analytical solution to a system of ODE. |
- BioSANS2020.propagation.symbolic.analytical_sol.solve_with_timeout(f_e, j_s)¶
resturn solution to the system of equation in f_e with variables symbos in the list j_s
- Args:
f_e (list): equations j_s (list): Symbols
- Returns:
dict: sometimes list but normally {variable : value}
- BioSANS2020.propagation.symbolic.analytical_sol.get_sets(r_dict, p_dict)¶
[summary]
- Args:
r_dict (dict): dictionary of reactants p_dict (dict): dictionary of products
- Returns:
set: sets to sum that will be used as constraints
- BioSANS2020.propagation.symbolic.analytical_sol.grab_steady_state(r_dict, p_dict, c_s, c_so, da_dt, j_s)¶
This function return steady state amounts of components
- Args:
r_dict (dict): reactants dictionary p_dict (dict): products dictionary c_s (dict): dictionary of concentration Symbols/values c_so (dict): dictionary of initial concentration Symbols/values da_dt ([type]): ode expression j_s ([type]): list of components
- Returns:
Matrix: steady state result
- BioSANS2020.propagation.symbolic.analytical_sol.cs_to_csr(f_x, c_s, cs_r, not_semi)¶
[summary]
- Args:
f_x (expression): sympy expression c_s (Symbol): sympy symbols cs_r (Symbol): equivalent of c_s not_semi (boolean): if True, use pure symbolic
- Returns:
expression: substituted expression
- BioSANS2020.propagation.symbolic.analytical_sol.analyt_soln(sp_comp, ks_dict, conc, r_dict, p_dict, stch_var, items=None, rfile='', not_semi=True, mode=None)¶
This function finds an analytical solution to a system of ODE.
- Args:
sp_comp (dict): dictionary of components ks_dict (dict): dictionary of rate constant conc (dict): dictionary of concentrations r_dict (dict): dictionary of reactants p_dict (dict): dictionary of products stch_var (Matrix): stoichiomentric matrix items (tuple, optional): (canvas, scroll_x, scrolly). rfile (str, optional): BioSANS topology file. not_semi (bool, optional): if True, use pure symbolic solution;
which is a function of time, initial concentration, and rate constant. Defaults to True.
- mode (str, optional): mode of computation;
ftxo - function of time and initial condition ftks - function of time and rate constant
Defaults to None.
- Returns:
dict: dictionary of solution