Commit 276058c8 authored by Kévin Moreau's avatar Kévin Moreau

correction in formulation superimposed

parent 49559c48
......@@ -33,7 +33,7 @@ public:
const xfem::xData&, const xParseData&,
PostProcessing&);
virtual ~Formulation();
public:
// Simple accessors
int getNbDofs() const;
std::string getMaterialClass() const;
......
......@@ -26,25 +26,30 @@ QSFormulationSuperimposed::QSFormulationSuperimposed(TLSGeom& geom, TLSSolver& t
QSFormulationSuperimposed::~QSFormulationSuperimposed() {}
void QSFormulationSuperimposed::applyEssentialEnv(double scale) {
xClassRegion bc(&geom.getMesh(), 11, 1);
DirichletBoundaryCondition(disp_field, "DISPLACEMENT_X", bc.begin(), bc.end(), 0.);
DirichletBoundaryCondition(disp_field, "DISPLACEMENT_Y", bc.begin(), bc.end(), 0.);
}
class MyNormal : public xEval<xVector> {
public:
void operator()(const xGeomElem* appro, const xGeomElem* integ, xVector& vec) const {
auto pt=integ->getXYZ();
double theta=atan2(pt(1), pt(0));
vec(0)=cos(theta);
vec(1)=sin(theta);
vec(2)=0.;
}
};
void QSFormulationSuperimposed::assembleNaturalEnv(LinearSystem& system) {
Formulation::assembleNaturalEnv(system);
NonUniformMaterialSensitivity_c<xTensor4> eval_stiffness("secant_matrix", variab_manager);
xFormLinearWithLoad<xGradOperator<xSymmetrize>, xEval<xTensor2> > form_linear(eval_stress_superimposed);
system.setAssemblerCoeff(-1.);
xEvalBinary<xMult<xTensor4, xTensor2, xTensor2>> eval_stress(eval_stiffness, eval_strain_superimposed);
xFormLinearWithLoad<xGradOperator<xSymmetrize>, xEval<xTensor2> > form_linear(eval_stress);
xFilteredRegion<xIter, xEntityFilter> superimposed(geom.begin(), geom.end(), xAcceptOnZoneID(101));
system.setAssemblerCoeff(-1.);
Assemble(form_linear, system.getAssembler(), geom.getIntegRuleSmart(), disp_field, superimposed.begin(), superimposed.end());
xEvalNormal eval_normal;
system.setAssemblerCoeff(1.);
MyNormal eval_normal;
xEvalBinary<xMult<xTensor2, xVector, xVector> > eval_traction(eval_stress_superimposed, eval_normal);
xFormLinearWithLoad<xValOperator<xIdentity<xVector> >, xEval<xVector> > lin(eval_traction);
xClassRegion bc(&geom.getMesh(), 12, 1);
Assemble(lin, system.getAssembler(), geom.getIntegRuleBasic(bc_integ_order), disp_field, bc.begin(), bc.end(), xUpperAdjacency());
system.setAssemblerCoeff(1.);
}
void QSFormulationSuperimposed::writeStrain(std::string name, std::string domain_name) {
......
......@@ -19,10 +19,6 @@ public:
const xfem::xEval<xfem::xTensor2>&, const xfem::xEval<xfem::xTensor2>&);
virtual ~QSFormulationSuperimposed();
// Constrains value by declaring it fixed (value state),
// gives the prescribed value from main.dat.
virtual void applyEssentialEnv(double);
// Assembles external force vector by reading main.dat file and
// assembles forces due to prescribed strain field.
virtual void assembleNaturalEnv(LinearSystem&);
......
......@@ -3,7 +3,7 @@ NAME = PMMA
PLANE_STATE = plane_strain
YOUNG_MODULUS = 3500.e6
POISSON_RATIO = 0.3
Y_CRIT = 637000.
Y_CRIT = 700000.
HARDENING = rational
HARDENING_COEFF = 1.
HARDENING_POWER = 0.25
integ_order = 6
integ_order = 4
disp_space_type = PolyLagrange
disp_space_dim = V2Dxy
disp_space_order = 1
disp_bc_integ_order = 1
disp_bc_integ_order = 4
mean_field_space_type = PolyLagrange
damage_shape = Poly2Revert
lc = 1.
......@@ -24,7 +24,7 @@ export_sensors_label = { load_factor 1 force_y 1 singularity_exponent 1 }
export_sensors_point = { }
do_infinite_mapping = 1
do_post_pro_filtering = 1
infinite_mapping_offset = 1.e-4
infinite_mapping_offset = 0.
notch_angle = 90.
internal_radius = 5.
external_radius = 6.5
......@@ -4,3 +4,6 @@ MESH_FILE = mesh.msh
ZONE 101 = { MAT_CLASS = ElastoDam MAT_PARAM = mate.mat }
ZONE 102 = { MAT_CLASS = ElastoDam MAT_PARAM = mate.mat }
BC_LINE 11 = { DISPLACEMENT_X FIX_AND_MEASURE = 0.
DISPLACEMENT_Y FIX_AND_MEASURE = 0. }
......@@ -110,7 +110,7 @@ int main(int argc, char* argv[]) {
xfem::xEntityFilter filter=xfem::xAcceptAll();
if(parse_data.getInt("do_infinite_mapping")) {
InfiniteOrLagrangeMappingBuilder mapping_builder(101, 102, r, R+parse_data.getDouble("infinite_mapping_offset"), 0.5);
InfiniteOrLagrangeMappingBuilder mapping_builder(101, 102, r, R+parse_data.getDouble("infinite_mapping_offset"), 1.);
xfem::xMappingBuilderHolderSingleton::instance().setMappingBuilder(mapping_builder);
if(parse_data.getInt("do_post_pro_filtering")) {
filter=xfem::xAcceptOnZoneID(101);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment