error with problem.build_solver(timestepper) in IVP probelm

49 views
Skip to first unread message

Zhengzhan Shang

unread,
Jul 4, 2024, 12:40:25 PMJul 4
to Dedalus Users
Hello all,

I am running an IVP problem in a rotating ellipsoid setting with stress free boundary condition. I am getting error on the solver=problem.build_solver(timestepper), which had not been an issue before. I have used the same code for my no-slip boundary condition before, and it ran smoothly. But after I changed the boundary condition, this problem occurred. Maybe you can lend me a helping hand. I have attached my code and parameter file in this email.

The error message reads:

Traceback (most recent call last):
  File "/home/upgp/zshang/Documents/elliptical_instability/stress-free_BC/spheroid.py", line 121, in <module>
    solver = problem.build_solver(timestepper)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/upgp/zshang/miniforge3/envs/dedalus3/lib/python3.11/site-packages/dedalus/core/problems.py", line 98, in build_solver
    return self.solver_class(self, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/upgp/zshang/miniforge3/envs/dedalus3/lib/python3.11/site-packages/dedalus/core/solvers.py", line 528, in __init__
    self.build_matrices(self.subproblems, ['M', 'L'])
  File "/home/upgp/zshang/miniforge3/envs/dedalus3/lib/python3.11/site-packages/dedalus/core/solvers.py", line 120, in build_matrices
    subsystems.build_subproblem_matrices(self, subproblems, matrices)
  File "/home/upgp/zshang/miniforge3/envs/dedalus3/lib/python3.11/site-packages/dedalus/core/subsystems.py", line 80, in build_subproblem_matrices
    subproblem.build_matrices(matrices)
  File "/home/upgp/zshang/miniforge3/envs/dedalus3/lib/python3.11/site-packages/dedalus/core/subsystems.py", line 457, in build_matrices
    eqn_blocks = eqn[name].expression_matrices(subproblem=self, vars=vars, ncc_cutoff=solver.ncc_cutoff, max_ncc_terms=solver.max_ncc_terms)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/upgp/zshang/miniforge3/envs/dedalus3/lib/python3.11/site-packages/dedalus/core/operators.py", line 756, in expression_matrices
    operator_mat = self.subproblem_matrix(subproblem)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/upgp/zshang/miniforge3/envs/dedalus3/lib/python3.11/site-packages/dedalus/core/operators.py", line 3068, in subproblem_matrix
    matrix = self._coupled_ell_matrices(regindex_in, regindex_out, m)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/upgp/zshang/miniforge3/envs/dedalus3/lib/python3.11/site-packages/dedalus/core/operators.py", line 3084, in _coupled_ell_matrices
    ell_list = np.arange(np.abs(m), basis.Lmax+1)
                         ^^^^^^^^^
TypeError: bad operand type for abs(): 'NoneType'


Best regards,
Shang
spheroid.py
input_spheroid.json
Reply all
Reply to author
Forward
0 new messages