Beispiel #1
0
    def _complete_params_with_default(params):
        """This static method is used to complete the *params* container.
        """
        SimulBasePseudoSpectral._complete_params_with_default(params)
        params._set_attrib("f", None)
        params._set_doc(params._doc + """
f: float (default None)

    Coriolis parameter (effect of the system rotation).
""")
Beispiel #2
0
    def init_params(cls):

        cls.params = params = SimulBasePseudoSpectral.create_default_params()
        params.short_name_type_run = "test_preprocess_ps"
        nh = 16
        Lh = 2 * np.pi
        params.oper.nx = nh
        params.oper.ny = nh
        params.oper.Lx = Lh
        params.oper.Ly = Lh
        params.init_fields.type = "constant"
        params.preprocess.enable = True
        params.preprocess.viscosity_type = "laplacian"
        params.preprocess.viscosity_scale = "energy"
Beispiel #3
0
    def _complete_params_with_default(params):
        r"""This static method is used to complete the *params* container.

        Notes
        -----

        - :math:`f` is the system rotation.

        - :math:`c` is the phase speed of surface gravity waves in the short-
          wave limit.

        - :math:`k_d` is the Rossby deformation wavenumber.

        - :math:`\beta` is differential rotation parameter, approximately given
          by :math:`\partial_y f`.

        The present solver will not work in the beta-plane. However a
        vorticity-divergence formulation can be solved with a beta term.

        """
        SimulBasePseudoSpectral._complete_params_with_default(params)

        attribs = {"f": 0, "c2": 20, "kd2": 0, "beta": 0}
        params._set_attribs(attribs)
Beispiel #4
0
 def _complete_params_with_default(params):
     """Complete the `params` container (static method)."""
     SimulBasePseudoSpectral._complete_params_with_default(params)
     attribs = {"beta": 0.0}
     params._set_attribs(attribs)
Beispiel #5
0
 def _complete_params_with_default(params):
     """This static method is used to complete the *params* container.
     """
     SimulBasePseudoSpectral._complete_params_with_default(params)
     attribs = {"c2": 1.0, "f": 0}
     params._set_attribs(attribs)
Beispiel #6
0
 def test_merge(self):
     """Test merging parameters."""
     params1 = SimulBase.create_default_params()
     params2 = Simul.create_default_params()
     merge_params(params1, params2)
Beispiel #7
0
 def _complete_params_with_default(params):
     SimulBasePseudoSpectral._complete_params_with_default(params)
     params._set_attrib("U", 1.0)