dedalus.core.problems ===================== .. py:module:: dedalus.core.problems .. autoapi-nested-parse:: Classes for representing systems of equations. Module Contents --------------- .. py:class:: EigenvalueProblem(variables, eigenvalue, **kw) Linear eigenvalue problems. :Parameters: * **variables** (*list of Field objects*) -- Problem variables to solve for. * **eigenvalue** (*Field object*) -- Field object representing the eigenvalue. * **namespace** (*dict-like, optional*) -- Dictionary for namespace additions to use when parsing strings as equations (default: None). It is recommended to pass "locals()" from the user script. .. rubric:: Notes This class supports linear eigenvalue problems of the form: λ*M.X + L.X = 0 The LHS terms must be linear in the specified variables and affine in the eigenvalue. The RHS must be zero. .. py:attribute:: eigenvalue .. py:attribute:: solver_class .. py:class:: InitialValueProblem(variables, time='t', **kw) Initial value problems. :Parameters: * **variables** (*list of Field objects*) -- Problem variables to solve for. * **time** (*str or Field object, optional*) -- Name (if str) or field for time variable (default: 't'). * **namespace** (*dict-like, optional*) -- Dictionary for namespace additions to use when parsing strings as equations (default: None). It is recommended to pass "locals()" from the user script. .. rubric:: Notes This class supports non-linear initial value problems of the form: M.dt(X) + L.X = F(X, t) The LHS terms must be linear in the problem variables, time independent, and first-order in time derivatives. The RHS terms must not contain any explicit time derivatives. .. py:method:: build_EVP(eigenvalue=None, backgrounds=None, perturbations=None, **kw) Create an eigenvalue problem from an initial value problem. :Parameters: * **eigenvalue** (*Field, optional*) -- Eigenvalue field. * **backgrounds** (*list of Fields, optional*) -- Background fields for linearizing the RHS. Default: the IVP variables. * **perturbations** (*list of Fields, optional*) -- Perturbation fields for the EVP. Default: copies of IVP variables. .. rubric:: Notes This method converts time-independent IVP equations of the form M.dt(X) + L.X = F(X) to EVP equations as λ*M.X1 + L.X1 - F'(X0).X1 = 0. If backgrounds (X0) are not specified, the IVP variables (X) are used. .. py:attribute:: solver_class .. py:class:: LinearBoundaryValueProblem(variables, namespace=None) Linear boundary value problems. :Parameters: * **variables** (*list of Field objects*) -- Problem variables to solve for. * **namespace** (*dict-like, optional*) -- Dictionary for namespace additions to use when parsing strings as equations (default: None). It is recommended to pass "locals()" from the user script. .. rubric:: Notes This class supports linear boundary value problems of the form: L.X = F The LHS terms must be linear in the problem variables, and the RHS can be inhomogeneous but must be independent of the problem variables. Solution procedure: - Form L - Evaluate F - Solve X = L \ F .. py:attribute:: solver_class .. py:class:: NonlinearBoundaryValueProblem(*args, **kw) Nonlinear boundary value problems. :Parameters: * **variables** (*list of Field objects*) -- Problem variables to solve for. * **namespace** (*dict-like, optional*) -- Dictionary for namespace additions to use when parsing strings as equations (default: None). It is recommended to pass "locals()" from the user script. .. rubric:: Notes This class supports nonlinear boundary value problems of the form: G(X) = H(X) which are recombined to form the root-finding problem: F(X) = G(X) - H(X) = 0 The problem is reduced into a linear BVP for an update to the solution using the Newton-Kantorovich method and the symbolically-computed Frechet differential of the equation: F(X[n+1]) = 0 F(X[n] + dX) = 0 F(X[n]) + dF(X[n]).dX = 0 dF(X[n]).dX = - F(X[n]) Iteration procedure: - Form dF(X[n]) - Evaluate F(X[n]) - Solve dX = - dF(X[n]) \ F(X[n]) - Update X[n+1] = X[n] + dX .. py:attribute:: LHS_variables .. py:attribute:: perturbations .. py:attribute:: solver_class .. py:data:: EVP .. py:data:: IVP .. py:data:: LBVP .. py:data:: NLBVP