-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CompressiblePotentialFlowApp] Adding Line Search Strategy to settings #11575
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
I would just suggest to check if any of the functions
_CreatePotentialFlowLinearStrategy
_CreatePotentialFlowNewtonRaphsonStrategy
_CreatePotentialFlowLineSearchStrategy
can be derived from fluid_solver.py to avoid code duplication, for instance:
Kratos/applications/FluidDynamicsApplication/python_scripts/fluid_solver.py
Lines 409 to 422 in 5a16407
def _CreateNewtonRaphsonStrategy(self): | |
computing_model_part = self.GetComputingModelPart() | |
time_scheme = self._GetScheme() | |
convergence_criterion = self._GetConvergenceCriterion() | |
builder_and_solver = self._GetBuilderAndSolver() | |
return KratosMultiphysics.ResidualBasedNewtonRaphsonStrategy( | |
computing_model_part, | |
time_scheme, | |
convergence_criterion, | |
builder_and_solver, | |
self.settings["maximum_iterations"].GetInt(), | |
self.settings["compute_reactions"].GetBool(), | |
self.settings["reform_dofs_at_each_step"].GetBool(), | |
self.settings["move_mesh_flag"].GetBool()) |
Hi @marcnunezc, thanks for the comment. For the Newton Raphson I see that it would not be a problem, the line search I think is not included in the fluid_solver.py and for the linear strategy I see that has the option to calculate the norm set to false by default. I could use the Newton Raphson and the linear strategy but I should also remove that option from the settings. I don't know if we need to be able to configure this option. I think that would be the only problem. |
Ok! Then I would try to use those functions from the fluid_solver.py, so only the line_search should be on the potential solver. Regarding the |
Perfect, I already uploaded the changes. So I think it's ready. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! thanks
📝 Description
This PR adds the use of the line search strategy in the application.
The use of this method provides better stability in nonlinear problems even in those with strong nonlinearities as occurs in a transonic flow with strongs shocks.
This also allows obtaining better results in cases in which it would not converge using only Newton Raphson.
🆕 Changelog