Skip to content
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

MaterialIDs for solid models #2216

Merged
merged 16 commits into from Sep 25, 2018

Conversation

Projects
None yet
3 participants
@endJunction
Copy link
Member

endJunction commented Sep 20, 2018

Does not change the current behaviour: A single constitutive relation is used independent of MaterialIDs being present or not, if there is only one <constitutive_relation> section.
Adding an "id" attribute to it <constitutive_relation id="42"> and having multiple constitutive relations requires the MaterialIDs to be available and there must be a one-to-one correspondence.

Added a simple test gravity with two different materials having different E moduli.
Modified a CreepBGRa test, which was using a special case of the BGRa model (A = 0) to simulate the linear elastic case. Now there are two different materials.


// Constitutive relations.
auto solid_materials =
MaterialLib::Solids::createConstitutiveRelations<DisplacementDim>(

This comment has been minimized.

@endJunction

endJunction Sep 20, 2018

Author Member

One could collect material_ids and solid_materials in single class and add the above select... function to it...

@endJunction endJunction force-pushed the endJunction:MaterialIdsForSolidModels branch from 28825bb to 9eb2744 Sep 21, 2018

@@ -53,10 +54,12 @@ HydroMechanicsLocalAssembler<ShapeFunctionDisplacement, ShapeFunctionPressure,
IntegrationMethod, DisplacementDim>(
e, is_axially_symmetric, _integration_method);

auto& solid_material = MaterialLib::Solids::selectSolidConstitutiveRelation(

This comment has been minimized.

@wenqing

wenqing Sep 21, 2018

Member

const?

This comment has been minimized.

@endJunction

endJunction Sep 21, 2018

Author Member

This is actually possible. Did mark the integrateStress and create*State functions as const, then this one and in the IPData too...

@@ -82,10 +72,14 @@ struct HydroMechanicsProcessData
//! Assignments are not needed.
void operator=(HydroMechanicsProcessData&&) = delete;

MeshLib::PropertyVector<int> const* material_ids;

This comment has been minimized.

@wenqing

wenqing Sep 21, 2018

Member

Can the type be reference?

This comment has been minimized.

@endJunction

endJunction Sep 21, 2018

Author Member

No, not with current implementation. It is allowed not to have the 'material_ids'.

@@ -98,9 +98,14 @@ std::unique_ptr<Process> createSmallDeformationProcess(
process_variables;
process_variables.push_back(std::move(per_process_variables));

auto const material_ids =

This comment has been minimized.

@wenqing

wenqing Sep 21, 2018

Member

Can it be a member of mesh class? It appears in several functions.

This comment has been minimized.

@wenqing

wenqing Sep 21, 2018

Member

I mean to add a member to Mesh as

PropertyVector<int> Mesh::getMaterialIDs() const
{
return _properties.existsPropertyVector<int>("MaterialIDs")
            ? _properties.getPropertyVector<int>("MaterialIDs")
            : nullptr;
}

This comment has been minimized.

@endJunction

endJunction Sep 21, 2018

Author Member

What do other think if we add a free function in MeshLib namespace?

PropertyVector<int>* materialIDs(Mesh const&);

This comment has been minimized.

@wenqing

wenqing Sep 21, 2018

Member

Sounds good.

@wenqing
Copy link
Member

wenqing left a comment

Looks good.

intrinsic_permeability, specific_storage,
fluid_viscosity, fluid_density,
biot_coefficient, porosity,
solid_density, specific_body_force,

This comment has been minimized.

@TomFischer

TomFischer Sep 24, 2018

Member

Is the formatting okay?

This comment has been minimized.

@endJunction

endJunction Sep 24, 2018

Author Member

Looks good to clang-format...

@TomFischer
Copy link
Member

TomFischer left a comment

Looks good.

endJunction added some commits Sep 17, 2018

[MatL] Add createConstitutiveRelations().
The function wraps the original createConstitutiveRelation()
function while checking the "id" attribute in the
<constitutive_relation id="0"> tag. The return value becomes
a map from int to constitutive relation pointers.
[PL] RF; Pass material_ids pointer, not optional.
A pointer has the same semantics as an optional in this case.

@endJunction endJunction force-pushed the endJunction:MaterialIdsForSolidModels branch 2 times, most recently from a55af68 to 8f9bf1d Sep 24, 2018

@endJunction endJunction force-pushed the endJunction:MaterialIdsForSolidModels branch from 8f9bf1d to fea1144 Sep 25, 2018

@endJunction endJunction merged commit 8fd476d into ufz:master Sep 25, 2018

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/jenkins/pr-merge This commit looks good
Details
deploy/netlify Deploy preview ready!
Details

@endJunction endJunction deleted the endJunction:MaterialIdsForSolidModels branch Sep 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.