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

Phasefield_wip #1895

Merged
merged 35 commits into from Aug 15, 2017

Conversation

Projects
None yet
3 participants
@xingyuanmiao
Contributor

xingyuanmiao commented Aug 3, 2017

The mechanical phase-field process was implemented. Currently, the implementation has a 3D homogeneous unconfined compression test. Other three large tests(3D cracking beam; tension of single-edge-notch test; shear of single-edge-notch test ) will be added soon.

@xingyuanmiao xingyuanmiao force-pushed the xingyuanmiao:phasefield_wip branch 18 times, most recently from 1396bec to 209c4bf Aug 3, 2017

double const degradation = d_ip * d_ip * (1 - k) + k;
eps.noalias() = B * u;
auto C = _ip_data[ip].updateConstitutiveRelation(t, x_position, dt, u,
degradation);

This comment has been minimized.

@endJunction

endJunction Aug 9, 2017

Member

There is a warning about the C variable being unused. I think the call to material_model.integrateStress(...) is unnecessary, because everything is handled in the material_model.calculateDegradedStress(...) function.

strain_energy_tensile = mu * epsd_curr.transpose() * epsd_curr;
sigma_tensile.noalias() = (2 * mu * epsd_curr).eval();
sigma_compressive.noalias() =
(K * eps_curr_trace * Invariants::identity2).eval();

This comment has been minimized.

@endJunction

endJunction Aug 9, 2017

Member

eval() calls are not needed in these cases.

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 9, 2017

Contributor

removed eval() calls in calculation of stress components.

{
using KelvinVector = ProcessLib::KelvinVectorType<DisplacementDim>;
using KelvinMatrix = ProcessLib::KelvinMatrixType<DisplacementDim>;
virtual bool calculateDegradedStress(double const t,

This comment has been minimized.

@endJunction

endJunction Aug 9, 2017

Member

Short description of the function, especially difference to the integrateStress is needed.

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 9, 2017

Contributor

description of the function used to decompose the strain energy in order to take into account its degradation due to irreversible crack formation and propagation from physical perspective is added.

This comment has been minimized.

@endJunction

endJunction Aug 14, 2017

Member

Please add the description to the code as doxygen comment.

@@ -0,0 +1,3 @@
The type of constitutive relation. See
ProcessLib::PhaseField::createPhaseFieldProcess()

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

Please drop

See
+ProcessLib::PhaseField::createPhaseFieldProcess()

and list all types instead.

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 9, 2017

Contributor

added all types available.

@@ -0,0 +1 @@
Process variable name for phasefield.

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

name for phasefield --> name of phasefield.

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 9, 2017

Contributor

rephrased.

@@ -0,0 +1 @@
Process variable name for displacement.

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

name for displacement --> name of displacement

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 9, 2017

Contributor

rephrased.

template <int DisplacementDim>
std::unique_ptr<LinearElasticIsotropicPhaseField<DisplacementDim>>
createLinearElasticIsotropicPhaseField(

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

This function is almost identical to that defined in MaterialLib/SolidModels/createLinearElasticIsotropic.h. Therefore, I suggest to use createLinearElasticIsotropic() with a little modification, e.g. changing the return type to a template argument.

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

Like

template <int DisplacementDim, template<int> class LinearElasticIsotropic>
std::unique_ptr<LinearElasticIsotropic<DisplacementDim>>
createLinearElasticIsotropic(...)

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 10, 2017

Contributor

removed createLinearElasticIsotropicPhaseField.h.

template <int DisplacementDim>
class LinearElasticIsotropicPhaseField final
: public LinearElasticIsotropic<DisplacementDim>,
public PhaseFieldExtension<DisplacementDim>

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

Is there any reason to set PhaseFieldExtension as one of the base classes?
I think the stuff in PhaseFieldExtension can be merged in this class, and the base public PhaseFieldExtension<DisplacementDim> can be replaced with MechanicsBase<DisplacementDim>.

/// Dynamic size Kelvin vector and matrix wrapper for the polymorphic
/// constitutive relation compute function.
bool calculateDegradedStress(

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

I can not find this member is called. Maybe I am wrong.

This comment has been minimized.

@endJunction

endJunction Aug 14, 2017

Member

If the eigen matrix policy is set to dynamically sized matrices this interface is used.

"implemented.");
}
void assembleWithJacobian(double const t,

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

Documentation is needed for this assembly. You can use the attached PDF. To do this

  1. Set HTML_EXTRA_FILES in Doxyfile.in (https://github.com/xingyuanmiao/ogs/blob/phasefield_wip/Documentation/Doxyfile.in#L1137) as
    HTML_EXTRA_FILES = ../../web/content/docs/benchmarks/phase-field/Miao_Biot2017.pdf
  2. Cite the PDF with a link to the pdf, for example, <a href="Miao_Biot2017.pdff" target="_blank"><b>Phase field method</b></a>.

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 9, 2017

Contributor

description of the phase-field model is added.

material = nullptr;
if (type == "LinearElasticIsotropicPhaseField")
{
material = MaterialLib::Solids::createLinearElasticIsotropicPhaseField<

This comment has been minimized.

@wenqing

wenqing Aug 9, 2017

Member

Here the changes could be

 material = MaterialLib::Solids::createLinearElasticIsotropic<
            DisplacementDim, LinearElasticIsotropicPhaseField>(parameters, constitutive_relation_config);

This comment has been minimized.

@wenqing

wenqing Aug 10, 2017

Member

You can use MaterialLib::Solids::createLinearElasticIsotropic here directly without modifying MaterialLib::Solids::createLinearElasticIsotropic.

This comment has been minimized.

@wenqing

wenqing Aug 10, 2017

Member
if (type == "LinearElasticIsotropic")
{
        auto const& elastic_model = MaterialLib::Solids::createLinearElasticIsotropic<DisplacementDim>               (parameters, constitutive_relation_config);
        material =  std::make_unique<LinearElasticIsotropicPhaseField<DisplacementDim>>(elastic_model->...);
}
type.c_str());
}
// Residual stiffness

This comment has been minimized.

@wenqing

wenqing Aug 10, 2017

Member

phase_field_parameter.

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 10, 2017

Contributor

added phasefield_parameters.

@xingyuanmiao xingyuanmiao force-pushed the xingyuanmiao:phasefield_wip branch from c17e4bd to cbf2122 Aug 10, 2017

@@ -107,28 +111,28 @@ std::unique_ptr<Process> createPhaseFieldProcess(
// Residual stiffness
auto& residual_stiffness = findParameter<double>(
config,
phasefield_parameters_config,
//! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__residual_stiffness}

This comment has been minimized.

@wenqing

wenqing Aug 10, 2017

Member

PHASE_FIELD__residual_stiffness -->PHASE_FIELD__phasefield_parameters__residual_stiffness

//! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__crack_resistance}
"crack_resistance", parameters, 1);
DBUG("Use \'%s\' as crack resistance.", crack_resistance.name.c_str());
// Crack length scale
auto& crack_length_scale = findParameter<double>(
config,
phasefield_parameters_config,
//! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__crack_length_scale}

This comment has been minimized.

@wenqing

wenqing Aug 10, 2017

Member

missing phasefield_parameters__ after PHASE_FIELD__.

//! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__crack_length_scale}
"crack_length_scale", parameters, 1);
DBUG("Use \'%s\' as crack length scale.", crack_length_scale.name.c_str());
// Kinetic coefficient
auto& kinetic_coefficient = findParameter<double>(
config,
phasefield_parameters_config,
//! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__kinetic_coefficient}

This comment has been minimized.

@wenqing

wenqing Aug 10, 2017

Member

missing phasefield_parameters__ after PHASE_FIELD__.

@@ -143,7 +147,7 @@ std::unique_ptr<Process> createPhaseFieldProcess(
// History field
auto& history_field = findParameter<double>(
config,
phasefield_parameters_config,
//! \ogs_file_param_special{prj__processes__process__PHASE_FIELD__history_field}

This comment has been minimized.

@wenqing

wenqing Aug 10, 2017

Member

missing phasefield_parameters__ after PHASE_FIELD__.

This comment has been minimized.

@xingyuanmiao

xingyuanmiao Aug 10, 2017

Contributor

added missing phasefield_parameters after PHASE_FIELD.

@xingyuanmiao xingyuanmiao force-pushed the xingyuanmiao:phasefield_wip branch from 7b6b7ce to 5d4e345 Aug 14, 2017

mu * epsd_curr.transpose() * epsd_curr;
sigma_tensile.noalias() =
(K * eps_curr_trace * Invariants::identity2 +
2 * mu * epsd_curr).eval();

This comment has been minimized.

@endJunction

endJunction Aug 14, 2017

Member

minor: eval() call is not needed here.

@xingyuanmiao xingyuanmiao force-pushed the xingyuanmiao:phasefield_wip branch from 5d8ba83 to 6ebac33 Aug 15, 2017

@endJunction endJunction merged commit fd497b0 into ufz:master Aug 15, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment