pymor.analyticalproblems package¶
Submodules¶
burgers module¶
-
pymor.analyticalproblems.burgers.
burgers_problem
(v=1.0, circle=True, initial_data_type='sin', parameter_range=(1.0, 2.0))[source]¶ One-dimensional Burgers-type problem.
The problem is to solve
∂_t u(x, t, μ) + ∂_x (v * u(x, t, μ)^μ) = 0 u(x, 0, μ) = u_0(x)
for u with t in [0, 0.3] and x in [0, 2].
Parameters
- v
- The velocity v.
- circle
- If
True
, impose periodic boundary conditions. Otherwise Dirichlet left, outflow right. - initial_data_type
- Type of initial data (
'sin'
or'bump'
). - parameter_range
- The interval in which μ is allowed to vary.
-
pymor.analyticalproblems.burgers.
burgers_problem_2d
(vx=1.0, vy=1.0, torus=True, initial_data_type='sin', parameter_range=(1.0, 2.0))[source]¶ Two-dimensional Burgers-type problem.
The problem is to solve
∂_t u(x, t, μ) + ∇ ⋅ (v * u(x, t, μ)^μ) = 0 u(x, 0, μ) = u_0(x)
for u with t in [0, 0.3], x in [0, 2] x [0, 1].
Parameters
- vx
- The x component of the velocity vector v.
- vy
- The y component of the velocity vector v.
- torus
- If
True
, impose periodic boundary conditions. Otherwise, Dirichlet left and bottom, outflow top and right. - initial_data_type
- Type of initial data (
'sin'
or'bump'
). - parameter_range
- The interval in which μ is allowed to vary.
elliptic module¶
-
class
pymor.analyticalproblems.elliptic.
StationaryProblem
(domain, rhs=None, diffusion=None, advection=None, nonlinear_advection=None, nonlinear_advection_derivative=None, reaction=None, nonlinear_reaction=None, nonlinear_reaction_derivative=None, dirichlet_data=None, neumann_data=None, robin_data=None, parameter_space=None, name=None)[source]¶ Bases:
pymor.core.interfaces.ImmutableInterface
Linear elliptic problem description.
The problem consists in solving
- ∇ ⋅ [d(x, μ) ∇ u(x, μ)] + ∇ ⋅ [f(x, u(x, μ), μ)] + c(x, u(x, μ), μ) = f(x, μ)
for u.
Parameters
- domain
- A
DomainDescription
of the domain the problem is posed on. - rhs
- The
Function
f(x, μ).rhs.dim_domain
has to agree with the dimension ofdomain
, whereasrhs.shape_range
has to be()
. - diffusion
- The
Function
d(x, μ) withshape_range
of either()
or(dim domain, dim domain)
. - advection
- The
Function
f, only depending on x, withshape_range
of(dim domain,)
. - nonlinear_advection
- The
Function
f, only depending on u, withshape_range
of(dim domain,)
. - nonlinear_advection_derivative
- The derivative of f, only depending on u, with respect to u.
- reaction
- The
Function
c, only depending on x, withshape_range
of()
. - nonlinear_reaction
- The
Function
c, only depending on u, withshape_range
of()
. - nonlinear_reaction_derivative
- The derivative of the
Function
c, only depending on u, withshape_range
of()
. - dirichlet_data
Function
providing the Dirichlet boundary values.- neumann_data
Function
providing the Neumann boundary values.- robin_data
- Tuple of two
Functions
providing the Robin parameter and boundary values. - parameter_space
ParameterSpace
for the problem.- name
- Name of the problem.
Methods
ImmutableInterface
generate_sid
,with_
,__setattr__
BasicInterface
disable_logging
,enable_logging
,has_interface_name
,implementor_names
,implementors
Attributes
-
domain
¶
-
rhs
¶
-
diffusion
¶
-
advection
¶
-
nonlinear_advection
¶
-
nonlinear_advection_derivative
¶
-
reaction
¶
-
nonlinear_reaction
¶
-
nonlinear_reaction_derivative
¶
-
dirichlet_data
¶
-
neumann_data
¶
-
robin_data
¶
helmholtz module¶
-
pymor.analyticalproblems.helmholtz.
helmholtz_problem
(domain=RectDomain([[0 0], [1 1]]), rhs=None, parameter_range=(0.0, 100.0), dirichlet_data=None, neumann_data=None)[source]¶ Helmholtz equation problem.
This problem is to solve the Helmholtz equation
- ∆ u(x, k) - k^2 u(x, k) = f(x, k)
on a given domain.
Parameters
- domain
- A
DomainDescription
of the domain the problem is posed on. - rhs
- The
Function
f(x, μ). - parameter_range
- A tuple
(k_min, k_max)
describing the interval in which k is allowd to vary. - dirichlet_data
Function
providing the Dirichlet boundary values.- neumann_data
Function
providing the Neumann boundary values.
instationary module¶
-
class
pymor.analyticalproblems.instationary.
InstationaryProblem
(stationary_part, initial_data, T=1.0, parameter_space=None, name=None)[source]¶ Bases:
pymor.core.interfaces.ImmutableInterface
Instationary problem description.
This class desciribes an instationary problem of the form
| ∂_t u(x, t, μ) + A(u(x, t, μ), t, μ) = f(x, t, μ), | u(x, 0, μ) = u_0(x, μ)
where A, f are given by the problem’s
stationary_part
and t is allowed to vary in the interval [0, T].Parameters
- stationary_part
- The stationary part of the problem.
- initial_data
Function
providing the initial values u_0.- T
- The final time T.
- parameter_space
ParameterSpace
for the problem.- name
- Name of the problem.
Methods
InstationaryProblem
with_
ImmutableInterface
generate_sid
,__setattr__
BasicInterface
disable_logging
,enable_logging
,has_interface_name
,implementor_names
,implementors
Attributes
InstationaryProblem
parameter_space
,stationary_part
,T
,with_arguments
ImmutableInterface
add_with_arguments
,sid
,sid_ignore
BasicInterface
logger
,logging_disabled
,name
,uid
-
T
¶
-
stationary_part
¶
-
parameter_space
¶
-
name
¶
thermalblock module¶
-
pymor.analyticalproblems.thermalblock.
thermal_block_problem
(num_blocks=(3, 3), parameter_range=(0.1, 1))[source]¶ Analytical description of a 2D ‘thermal block’ diffusion problem.
This problem is to solve the elliptic equation
- ∇ ⋅ [ d(x, μ) ∇ u(x, μ) ] = f(x, μ)
on the domain [0,1]^2 with Dirichlet zero boundary values. The domain is partitioned into nx x ny blocks and the diffusion function d(x, μ) is constant on each such block (i,j) with value μ_ij.
---------------------------- | | | | | μ_11 | μ_12 | μ_13 | | | | | |--------------------------- | | | | | μ_21 | μ_22 | μ_23 | | | | | ----------------------------
Parameters
- num_blocks
- The tuple
(nx, ny)
- parameter_range
- A tuple
(μ_min, μ_max)
. EachParameter
component μ_ij is allowed to lie in the interval [μ_min, μ_max].