Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "SIMPLESolve.h" 11 : #include "FEProblem.h" 12 : #include "SegregatedSolverUtils.h" 13 : #include "LinearSystem.h" 14 : 15 : using namespace libMesh; 16 : 17 : InputParameters 18 1204 : SIMPLESolve::validParams() 19 : { 20 1204 : InputParameters params = LinearAssemblySegregatedSolve::validParams(); 21 1204 : return params; 22 : } 23 : 24 602 : SIMPLESolve::SIMPLESolve(Executioner & ex) : LinearAssemblySegregatedSolve(ex) {} 25 : 26 : void 27 2160 : SIMPLESolve::checkTimeKernels(LinearSystem & system) 28 : { 29 : // check to make sure that we don't have any time kernels in this simulation (Steady State) 30 2160 : if (system.containsTimeKernel()) 31 0 : mooseError("You have specified time kernels in your steady state simulation in system", 32 0 : system.name(), 33 : ", SIMPLE is a steady-state solver! Use the PIMPLE executioner instead."); 34 2160 : } 35 : 36 : void 37 602 : SIMPLESolve::checkIntegrity() 38 : { 39 : // check to make sure that we don't have any time kernels in this simulation (Steady State) 40 602 : if (_should_solve_momentum) 41 1768 : for (const auto system : _momentum_systems) 42 1166 : checkTimeKernels(*system); 43 : 44 602 : if (_should_solve_pressure) 45 602 : checkTimeKernels(_pressure_system); 46 : 47 602 : if (_has_energy_system && _should_solve_energy) 48 186 : checkTimeKernels(*_energy_system); 49 : 50 602 : if (_has_turbulence_systems && _should_solve_turbulence) 51 180 : for (const auto system : _turbulence_systems) 52 120 : checkTimeKernels(*system); 53 : 54 602 : if (_has_passive_scalar_systems && _should_solve_passive_scalars) 55 90 : for (const auto system : _passive_scalar_systems) 56 54 : checkTimeKernels(*system); 57 : 58 602 : if (_has_active_scalar_systems && _should_solve_active_scalars) 59 32 : for (const auto system : _active_scalar_systems) 60 16 : checkTimeKernels(*system); 61 602 : if (_has_pm_radiation_systems) 62 32 : for (const auto system : _pm_radiation_systems) 63 16 : checkTimeKernels(*system); 64 602 : }