Skip to content

[GeoMechanicsApplication] Include variable prediction in all Newmark schemes #11957

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

Closed
rfaasse opened this issue Jan 16, 2024 · 2 comments · Fixed by #13478 · May be fixed by #13449
Closed

[GeoMechanicsApplication] Include variable prediction in all Newmark schemes #11957

rfaasse opened this issue Jan 16, 2024 · 2 comments · Fixed by #13478 · May be fixed by #13449
Assignees

Comments

@rfaasse
Copy link
Contributor

rfaasse commented Jan 16, 2024

As a Kratos user, I would like to have prediction methods in the Newmark schemes, such that convergence is quicker when using these schemes.

Successor item: [GeoMechanicsApplication] Include variable prediction in the backward Euler schemes

Background
During the scheme refactoring, it was found that the dynamic Newmark scheme has an override for the 'Predict' method. This method predicts the values of certain variables before doing a solution step, to improve the rate of convergence.

However, there are two things missing here:

  1. The Predict method could move to the generalized Newmark baseclass for all Newmark schemes, such that all of them profit from the predictions.
  2. The predictions are currently only done for the displacements and rotations (in other words the second order vector variables). For the first order scalar variables (such as water pressure or temperature), the prediction is missing and should be added to speed up pressure/temperature convergence

Acceptance Criteria
Given a user specifies any Newmark scheme
When a simulation is run
Then the first and second order variables are predicted

Note: It might be interesting to document a few cases here and compare run times with/without predicts.

@rfaasse rfaasse converted this from a draft issue Jan 16, 2024
@rfaasse
Copy link
Contributor Author

rfaasse commented Jan 16, 2024

After a brief look at the code with @WPK4FEM, it seems that the first order prediction could be done by adding the following piece of code to the PredictVariablesForNode function (it is a simple first order Taylor expansion around the variable value).

        for (const auto& r_first_order_scalar_variable : this->GetFirstOrderScalarVariables())
        {
            if (!rNode.SolutionStepsDataHas(r_first_order_scalar_variable.instance) || rNode.IsFixed(r_first_order_scalar_variable.instance))
                continue;

            const double previous_variable =
                rNode.FastGetSolutionStepValue(r_first_order_scalar_variable.instance, 1);
            const double previous_first_time_derivative =
                rNode.FastGetSolutionStepValue(r_first_order_scalar_variable.first_time_derivative, 1);

            rNode.FastGetSolutionStepValue(r_first_order_scalar_variable.instance) =
                previous_variable + this->GetDeltaTime() * previous_first_time_derivative;
        }

@rfaasse
Copy link
Contributor Author

rfaasse commented Jan 16, 2024

For the Predict of the instance of the second order variables (e.g. displacement/rotation), we probably need to change the formulation from:

rNode.FastGetSolutionStepValue(instance_component) =
    previous_variable + this->GetDeltaTime() * previous_first_time_derivative +
    0.5 * this->GetDeltaTime() * this->GetDeltaTime() * previous_second_time_derivative;

to:

rNode.FastGetSolutionStepValue(instance_component) =
    previous_variable + this->GetDeltaTime() * previous_first_time_derivative +
    (0.5-this->GetBeta()) * this->GetDeltaTime() * this->GetDeltaTime() * previous_second_time_derivative;

See also https://ethz.ch/content/dam/ethz/special-interest/baug/ibk/structural-mechanics-dam/education/femII/presentation_05_dynamics_v3.pdf

@rfaasse rfaasse self-assigned this May 19, 2025
@rfaasse rfaasse moved this from 📑 Product Backlog to 👷 In Progress in Kratos Product Backlog May 19, 2025
@rfaasse rfaasse changed the title [GeoMechanicsApplication] Include variable prediction in all newmark schemes [GeoMechanicsApplication] Include variable prediction in all Newmark schemes May 19, 2025
@github-project-automation github-project-automation bot moved this from 👷 In Progress to ✅ Done in Kratos Product Backlog Jun 3, 2025
@indigocoral indigocoral moved this from ✅ Done to 👀 In Review in Kratos Product Backlog Jun 4, 2025
@indigocoral indigocoral moved this from 👀 In Review to 👷 In Progress in Kratos Product Backlog Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment