Skip to content

Commit ac9d4ca

Browse files
committed
Marked 2o homogenization features as experimental. Marked mortar contact features experimental. Moved 2o prescribed deformation bc to FEBioRVE.
1 parent b656e6c commit ac9d4ca

7 files changed

Lines changed: 185 additions & 136 deletions

FEBioMech/FEBCPrescribedDeformation.cpp

Lines changed: 0 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2323
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2424
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2525
SOFTWARE.*/
26-
27-
28-
2926
#include "stdafx.h"
3027
#include "FEBCPrescribedDeformation.h"
3128
#include <FECore/FEMesh.h>
@@ -91,90 +88,3 @@ void FEBCPrescribedDeformation::GetNodalValues(int nodelid, std::vector<double>&
9188
val[1] = u.y;
9289
val[2] = u.z;
9390
}
94-
95-
//=============================================================================
96-
BEGIN_FECORE_CLASS(FEBCPrescribedDeformation2O, FEPrescribedNodeSet)
97-
ADD_PARAMETER(m_scale, "scale");
98-
ADD_PARAMETER(m_F , "F");
99-
ADD_PARAMETER(m_G , "G");
100-
ADD_PARAMETER(m_refNode, "reference");
101-
END_FECORE_CLASS();
102-
103-
FEBCPrescribedDeformation2O::FEBCPrescribedDeformation2O(FEModel* pfem) : FEPrescribedNodeSet(pfem)
104-
{
105-
m_scale = 1.0;
106-
m_F.unit();
107-
m_G.zero();
108-
m_refNode = -1;
109-
110-
if (pfem)
111-
{
112-
FEDofList dofs(pfem);
113-
dofs.AddVariable(FEBioMech::GetVariableName(FEBioMech::DISPLACEMENT));
114-
SetDOFList(dofs);
115-
}
116-
}
117-
118-
//-----------------------------------------------------------------------------
119-
bool FEBCPrescribedDeformation2O::Init()
120-
{
121-
if (m_refNode < 0) return false;
122-
return FEPrescribedNodeSet::Init();
123-
}
124-
125-
//-----------------------------------------------------------------------------
126-
// Sets the displacement scale factor. An optional load curve index can be given
127-
// of the load curve that will control the scale factor.
128-
void FEBCPrescribedDeformation2O::SetScale(double s, int lc)
129-
{
130-
m_scale = s;
131-
if (lc >= 0) AttachLoadController(&m_scale, lc);
132-
}
133-
134-
//-----------------------------------------------------------------------------
135-
void FEBCPrescribedDeformation2O::CopyFrom(FEBoundaryCondition* pbc)
136-
{
137-
FEBCPrescribedDeformation2O* ps = dynamic_cast<FEBCPrescribedDeformation2O*>(pbc); assert(ps);
138-
m_scale = ps->m_scale;
139-
m_F = ps->m_F;
140-
m_G = ps->m_G;
141-
m_refNode = ps->m_refNode;
142-
CopyParameterListState(ps->GetParameterList());
143-
}
144-
145-
//-----------------------------------------------------------------------------
146-
void FEBCPrescribedDeformation2O::SetReferenceNode(int n)
147-
{
148-
m_refNode = n;
149-
}
150-
151-
//-----------------------------------------------------------------------------
152-
void FEBCPrescribedDeformation2O::SetDeformationGradient(const mat3d& F)
153-
{
154-
m_F = F;
155-
}
156-
157-
//-----------------------------------------------------------------------------
158-
void FEBCPrescribedDeformation2O::SetDeformationHessian(const tens3drs& G)
159-
{
160-
m_G = G;
161-
}
162-
163-
//-----------------------------------------------------------------------------
164-
void FEBCPrescribedDeformation2O::GetNodalValues(int nodelid, std::vector<double>& val)
165-
{
166-
FEMesh& mesh = GetMesh();
167-
vec3d X1 = mesh.Node(m_refNode).m_r0;
168-
169-
vec3d X = GetNodeSet()->Node(nodelid)->m_r0;
170-
171-
mat3ds XX = dyad(X);
172-
mat3ds XX1 = dyad(X1);
173-
mat3d U = m_F - mat3dd(1.0);
174-
vec3d u = U*(X - X1) + m_G.contract2s(XX - XX1)*0.5;
175-
u*=m_scale;
176-
177-
val[0] = u.x;
178-
val[1] = u.y;
179-
val[2] = u.z;
180-
}

FEBioMech/FEBCPrescribedDeformation.h

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,10 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2323
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2424
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2525
SOFTWARE.*/
26-
27-
28-
2926
#pragma once
3027
#include <FECore/FEPrescribedBC.h>
31-
#include <FECore/tens3d.h>
3228
#include "febiomech_api.h"
3329

34-
//-----------------------------------------------------------------------------
3530
class FEBIOMECH_API FEBCPrescribedDeformation : public FEPrescribedNodeSet
3631
{
3732
public:
@@ -50,32 +45,3 @@ class FEBIOMECH_API FEBCPrescribedDeformation : public FEPrescribedNodeSet
5045

5146
DECLARE_FECORE_CLASS();
5247
};
53-
54-
//-----------------------------------------------------------------------------
55-
class FEBIOMECH_API FEBCPrescribedDeformation2O : public FEPrescribedNodeSet
56-
{
57-
public:
58-
FEBCPrescribedDeformation2O(FEModel* pfem);
59-
60-
void SetScale(double s, int lc = -1);
61-
62-
void SetReferenceNode(int n);
63-
64-
bool Init() override;
65-
66-
void SetDeformationGradient(const mat3d& F);
67-
void SetDeformationHessian(const tens3drs& G);
68-
69-
void CopyFrom(FEBoundaryCondition* pbc) override;
70-
71-
protected:
72-
void GetNodalValues(int nodelist, std::vector<double>& val) override;
73-
74-
protected:
75-
double m_scale;
76-
mat3d m_F;
77-
tens3drs m_G;
78-
int m_refNode;
79-
80-
DECLARE_FECORE_CLASS();
81-
};

FEBioMech/FEBioMechModule.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,6 @@ void FEBioMech::InitModule()
649649
REGISTER_FECORE_CLASS(FEBCPrescribedDeformation , "prescribed deformation");
650650
REGISTER_FECORE_CLASS(FEPrescribedNormalDisplacement, "normal displacement");
651651
REGISTER_FECORE_CLASS(FEBCRigidDeformation , "rigid deformation");
652-
REGISTER_FECORE_CLASS(FEBCPrescribedDeformation2O , "prescribed deformation 2O");
653652
REGISTER_FECORE_CLASS(FERigidNodeSet , "rigid");
654653

655654
//-----------------------------------------------------------------------------
@@ -843,7 +842,7 @@ void FEBioMech::InitModule()
843842
REGISTER_FECORE_CLASS(FEPlotRightHencky, "right Hencky");
844843
REGISTER_FECORE_CLASS(FEPlotLeftHencky, "left Hencky");
845844
REGISTER_FECORE_CLASS(FEPlotRateOfDeformation, "rate of deformation");
846-
REGISTER_FECORE_CLASS(FEPlotMortarContactGap, "mortar-gap");
845+
REGISTER_FECORE_CLASS(FEPlotMortarContactGap, "mortar-gap", FECORE_EXPERIMENTAL);
847846
REGISTER_FECORE_CLASS(FEPlotSurfaceTraction, "surface traction");
848847
REGISTER_FECORE_CLASS(FEPlotNodalSurfaceTraction, "nodal surface traction");
849848
REGISTER_FECORE_CLASS(FEPlotEnclosedVolume, "enclosed volume");
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
/*This file is part of the FEBio source code and is licensed under the MIT license
2+
listed below.
3+
4+
See Copyright-FEBio.txt for details.
5+
6+
Copyright (c) 2021 University of Utah, The Trustees of Columbia University in
7+
the City of New York, and others.
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy
10+
of this software and associated documentation files (the "Software"), to deal
11+
in the Software without restriction, including without limitation the rights
12+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
copies of the Software, and to permit persons to whom the Software is
14+
furnished to do so, subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.*/
26+
#include "stdafx.h"
27+
#include "FEBCPrescribedDeformation2O.h"
28+
#include <FECore/FEMesh.h>
29+
30+
BEGIN_FECORE_CLASS(FEBCPrescribedDeformation2O, FEPrescribedNodeSet)
31+
ADD_PARAMETER(m_scale, "scale");
32+
ADD_PARAMETER(m_F , "F");
33+
ADD_PARAMETER(m_G , "G");
34+
ADD_PARAMETER(m_refNode, "reference");
35+
END_FECORE_CLASS();
36+
37+
FEBCPrescribedDeformation2O::FEBCPrescribedDeformation2O(FEModel* pfem) : FEPrescribedNodeSet(pfem)
38+
{
39+
m_scale = 1.0;
40+
m_F.unit();
41+
m_G.zero();
42+
m_refNode = -1;
43+
44+
if (pfem)
45+
{
46+
FEDofList dofs(pfem);
47+
dofs.AddVariable("displacement");
48+
SetDOFList(dofs);
49+
}
50+
}
51+
52+
//-----------------------------------------------------------------------------
53+
bool FEBCPrescribedDeformation2O::Init()
54+
{
55+
if (m_refNode < 0) return false;
56+
return FEPrescribedNodeSet::Init();
57+
}
58+
59+
//-----------------------------------------------------------------------------
60+
// Sets the displacement scale factor. An optional load curve index can be given
61+
// of the load curve that will control the scale factor.
62+
void FEBCPrescribedDeformation2O::SetScale(double s, int lc)
63+
{
64+
m_scale = s;
65+
if (lc >= 0) AttachLoadController(&m_scale, lc);
66+
}
67+
68+
//-----------------------------------------------------------------------------
69+
void FEBCPrescribedDeformation2O::CopyFrom(FEBoundaryCondition* pbc)
70+
{
71+
FEBCPrescribedDeformation2O* ps = dynamic_cast<FEBCPrescribedDeformation2O*>(pbc); assert(ps);
72+
m_scale = ps->m_scale;
73+
m_F = ps->m_F;
74+
m_G = ps->m_G;
75+
m_refNode = ps->m_refNode;
76+
CopyParameterListState(ps->GetParameterList());
77+
}
78+
79+
//-----------------------------------------------------------------------------
80+
void FEBCPrescribedDeformation2O::SetReferenceNode(int n)
81+
{
82+
m_refNode = n;
83+
}
84+
85+
//-----------------------------------------------------------------------------
86+
void FEBCPrescribedDeformation2O::SetDeformationGradient(const mat3d& F)
87+
{
88+
m_F = F;
89+
}
90+
91+
//-----------------------------------------------------------------------------
92+
void FEBCPrescribedDeformation2O::SetDeformationHessian(const tens3drs& G)
93+
{
94+
m_G = G;
95+
}
96+
97+
//-----------------------------------------------------------------------------
98+
void FEBCPrescribedDeformation2O::GetNodalValues(int nodelid, std::vector<double>& val)
99+
{
100+
FEMesh& mesh = GetMesh();
101+
vec3d X1 = mesh.Node(m_refNode).m_r0;
102+
103+
vec3d X = GetNodeSet()->Node(nodelid)->m_r0;
104+
105+
mat3ds XX = dyad(X);
106+
mat3ds XX1 = dyad(X1);
107+
mat3d U = m_F - mat3dd(1.0);
108+
vec3d u = U*(X - X1) + m_G.contract2s(XX - XX1)*0.5;
109+
u*=m_scale;
110+
111+
val[0] = u.x;
112+
val[1] = u.y;
113+
val[2] = u.z;
114+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/*This file is part of the FEBio source code and is licensed under the MIT license
2+
listed below.
3+
4+
See Copyright-FEBio.txt for details.
5+
6+
Copyright (c) 2021 University of Utah, The Trustees of Columbia University in
7+
the City of New York, and others.
8+
9+
Permission is hereby granted, free of charge, to any person obtaining a copy
10+
of this software and associated documentation files (the "Software"), to deal
11+
in the Software without restriction, including without limitation the rights
12+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13+
copies of the Software, and to permit persons to whom the Software is
14+
furnished to do so, subject to the following conditions:
15+
16+
The above copyright notice and this permission notice shall be included in all
17+
copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25+
SOFTWARE.*/
26+
#pragma once
27+
#include <FECore/FEPrescribedBC.h>
28+
#include <FECore/tens3d.h>
29+
#include "febiorve_api.h"
30+
31+
class FEBIORVE_API FEBCPrescribedDeformation2O : public FEPrescribedNodeSet
32+
{
33+
public:
34+
FEBCPrescribedDeformation2O(FEModel* pfem);
35+
36+
void SetScale(double s, int lc = -1);
37+
38+
void SetReferenceNode(int n);
39+
40+
bool Init() override;
41+
42+
void SetDeformationGradient(const mat3d& F);
43+
void SetDeformationHessian(const tens3drs& G);
44+
45+
void CopyFrom(FEBoundaryCondition* pbc) override;
46+
47+
protected:
48+
void GetNodalValues(int nodelist, std::vector<double>& val) override;
49+
50+
protected:
51+
double m_scale;
52+
mat3d m_F;
53+
tens3drs m_G;
54+
int m_refNode;
55+
56+
DECLARE_FECORE_CLASS();
57+
};

FEBioRVE/FEBioRVE.cpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ SOFTWARE.*/
2929
#include "FEMicroMaterial2O.h"
3030
#include "FEMindlinElastic2O.h"
3131
#include "FEPeriodicBoundary2O.h"
32+
#include "FEBCPrescribedDeformation2O.h"
3233
#include "FE2OMicroConstraint.h"
3334
#include "FEElasticMultiscaleDomain1O.h"
3435
#include "FEElasticMultiscaleDomain2O.h"
@@ -47,22 +48,24 @@ void FEBioRVE::InitModule()
4748
febio.SetActiveModule("solid");
4849

4950
REGISTER_FECORE_CLASS(FEMicroMaterial, "micro-material");
50-
REGISTER_FECORE_CLASS(FEMicroMaterial2O, "micro-material2O");
51-
REGISTER_FECORE_CLASS(FEMindlinElastic2O, "mindlin elastic");
51+
REGISTER_FECORE_CLASS(FEMicroMaterial2O, "micro-material2O", FECORE_EXPERIMENTAL);
52+
REGISTER_FECORE_CLASS(FEMindlinElastic2O, "mindlin elastic", FECORE_EXPERIMENTAL);
5253

5354
REGISTER_FECORE_CLASS(FEMicroProbe, "probe");
5455

5556
REGISTER_FECORE_CLASS(FEElasticMultiscaleDomain1O, "elastic-mm-solid");
56-
REGISTER_FECORE_CLASS(FEElasticMultiscaleDomain2O, "elastic-mm-solid2O");
57-
REGISTER_FECORE_CLASS(FEElasticSolidDomain2O, "elastic-solid2O");
57+
REGISTER_FECORE_CLASS(FEElasticMultiscaleDomain2O, "elastic-mm-solid2O", FECORE_EXPERIMENTAL);
58+
REGISTER_FECORE_CLASS(FEElasticSolidDomain2O, "elastic-solid2O", FECORE_EXPERIMENTAL);
5859

59-
REGISTER_FECORE_CLASS(FE2OMicroConstraint, "2O microfluc");
60+
REGISTER_FECORE_CLASS(FEBCPrescribedDeformation2O, "prescribed deformation 2O", FECORE_EXPERIMENTAL);
6061

61-
REGISTER_FECORE_CLASS(FEPeriodicBoundary1O, "periodic boundary1O");
62-
REGISTER_FECORE_CLASS(FEPeriodicBoundary2O, "periodic boundary2O");
62+
REGISTER_FECORE_CLASS(FE2OMicroConstraint, "2O microfluc", FECORE_EXPERIMENTAL);
6363

64-
REGISTER_FECORE_CLASS(FEPlotElementGnorm, "G norm");
64+
REGISTER_FECORE_CLASS(FEPeriodicBoundary1O, "periodic boundary1O", FECORE_EXPERIMENTAL);
65+
REGISTER_FECORE_CLASS(FEPeriodicBoundary2O, "periodic boundary2O", FECORE_EXPERIMENTAL);
66+
67+
REGISTER_FECORE_CLASS(FEPlotElementGnorm, "G norm", FECORE_EXPERIMENTAL);
6568
REGISTER_FECORE_CLASS(FEPlotElementPK1norm, "PK1 norm");
66-
REGISTER_FECORE_CLASS(FEPlotElementQK1norm, "QK1 norm");
69+
REGISTER_FECORE_CLASS(FEPlotElementQK1norm, "QK1 norm", FECORE_EXPERIMENTAL);
6770
REGISTER_FECORE_CLASS(FEPlotElementMicroEnergy, "micro energy");
6871
}

FEBioRVE/FERVEModel2O.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SOFTWARE.*/
3636
#include "FECore/FEAnalysis.h"
3737
#include "FEBioMech/FESolidSolver2.h"
3838
#include "FEBioMech/FEElasticSolidDomain.h"
39-
#include "FEBioMech/FEBCPrescribedDeformation.h"
39+
#include "FEBCPrescribedDeformation2O.h"
4040
#include "FEPeriodicLinearConstraint2O.h"
4141
#include <FECore/FELinearConstraintManager.h>
4242
#include <FECore/FECube.h>

0 commit comments

Comments
 (0)