pyrc.validation.coupling.analytic#
- class ModelCoupling(blocks: list[Block])#
Bases:
ModelInitialize heat equation model with blocks.
- Parameters:
blocks (list of Block) – List of Block objects defining initial conditions
- __init__(blocks: list[Block])#
Initialize heat equation model with blocks.
- Parameters:
blocks (list of Block) – List of Block objects defining initial conditions
- error(n_terms, time)#
- get_function(n_terms=60)#
Returns function u(x,t) for 1D heat equation with adiabatic boundaries.
- Parameters:
n_terms (int) – Number of Fourier series terms
- Returns:
Function u(x, t) that returns temperature for given positions x and times t. The function returns a value, vector or matrix. Same x values are in rows, same t values are in columns. (x, t)
- Return type:
callable
- get_function_new(n_terms=100)#
Returns function u(x,t) for 1D heat equation with adiabatic boundaries.
- Parameters:
n_terms (int) – Number of Fourier series terms
- Returns:
Function u(x, t) that returns temperature for given positions x and times t. The function returns a value, vector or matrix. Same x values are in rows, same t values are in columns. (x, t)
- Return type:
callable
- get_n_terms(time, maximum_error=1e-10)#
- run_coupling_analytic(plot_data: str = None, n_terms=None)#