static BodyLoadElementFactory() { var interpolations = new Dictionary <CellType, IIsoparametricInterpolation3D>(); var integrationsForLoad = new Dictionary <CellType, IQuadrature3D>(); interpolations.Add(CellType.Tet4, InterpolationTet4.UniqueInstance); integrationsForLoad.Add(CellType.Tet4, TetrahedronQuadrature.Order1Point1); interpolations.Add(CellType.Tet10, InterpolationTet10.UniqueInstance); integrationsForLoad.Add(CellType.Tet10, TetrahedronQuadrature.Order2Points4); interpolations.Add(CellType.Hexa8, InterpolationHexa8.UniqueInstance); integrationsForLoad.Add(CellType.Hexa8, GaussLegendre3D.GetQuadratureWithOrder(2, 2, 2)); interpolations.Add(CellType.Hexa20, InterpolationHexa20.UniqueInstance); integrationsForLoad.Add(CellType.Hexa20, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)); interpolations.Add(CellType.Hexa27, InterpolationHexa27.UniqueInstance); integrationsForLoad.Add(CellType.Hexa27, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)); interpolations.Add(CellType.Wedge6, InterpolationWedge6.UniqueInstance); integrationsForLoad.Add(CellType.Wedge6, WedgeQuadrature.Points6); interpolations.Add(CellType.Wedge15, InterpolationWedge15.UniqueInstance); integrationsForLoad.Add(CellType.Wedge15, WedgeQuadrature.Points8); interpolations.Add(CellType.Wedge18, InterpolationWedge18.UniqueInstance); integrationsForLoad.Add(CellType.Wedge18, WedgeQuadrature.Points8); interpolations.Add(CellType.Pyra5, InterpolationPyra5.UniqueInstance); integrationsForLoad.Add(CellType.Pyra5, PyramidQuadrature.Points5); interpolations.Add(CellType.Pyra13, InterpolationPyra13.UniqueInstance); integrationsForLoad.Add(CellType.Pyra13, PyramidQuadrature.Points6); interpolations.Add(CellType.Pyra14, InterpolationPyra14.UniqueInstance); integrationsForLoad.Add(CellType.Pyra14, PyramidQuadrature.Points6); BodyLoadElementFactory.interpolations = interpolations; BodyLoadElementFactory.integrationsForLoad = integrationsForLoad; }
private static void ShellAndCohesiveRAM_11tlkShellPaktwsh(Model model) { //Origin: dhmiourgithike kata to ParadeigmataElegxwnBuilder.ShellAndCohesiveRAM_11ShellPaktwsh(model); // allaxame to cohesive element // gewmetria double Tk = 0.5; int nodeID = 1; double startX = 0; double startY = 0; double startZ = 0; for (int l = 0; l < 3; l++) { model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.25, z: startZ)); nodeID++; } startX = 0.25; for (int l = 0; l < 2; l++) { model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.5, z: startZ)); nodeID++; } startX = 0.5; for (int l = 0; l < 3; l++) { model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.25, z: startZ)); nodeID++; } // katw strwsh pou tha paktwthei startX = 0; for (int l = 0; l < 3; l++) { model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.25, z: startZ - 0.5 * Tk)); nodeID++; } startX = 0.25; for (int l = 0; l < 2; l++) { model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.5, z: startZ - 0.5 * Tk)); nodeID++; } startX = 0.5; for (int l = 0; l < 3; l++) { model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: startX, y: startY + l * 0.25, z: startZ - 0.5 * Tk)); nodeID++; } double[][] VH = new double[8][]; for (int j = 0; j < 8; j++) { VH[j] = new double[3]; VH[j][0] = 0; VH[j][1] = 0; VH[j][2] = 1; } // perioxh gewmetrias ews edw // constraints nodeID = 9; for (int j = 0; j < 8; j++) { model.NodesDictionary[nodeID].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[nodeID].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[nodeID].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); nodeID++; } //perioxh constraints ews edw // perioxh materials var material1 = new BenzeggaghKenaneCohesiveMaterial() { T_o_3 = 57, // New load case argurhs NR_shell_coh.m D_o_3 = 5.7e-5, D_f_3 = 0.0098245610, T_o_1 = 57, D_o_1 = 5.7e-5, D_f_1 = 0.0098245610, n_curve = 1.4, }; //ElasticMaterial3D material2 = new ElasticMaterial3D() //{ // YoungModulus = 1353000, // PoissonRatio = 0.3, //}; var material2 = new ShellElasticMaterial3D() { YoungModulus = 1353000, PoissonRatio = 0.3, ShearCorrectionCoefficientK = 5 / 6, }; // perioxh materials ews edw //eisagwgh tou shell element double[] Tk_vec = new double[8]; for (int j = 0; j < 8; j++) { Tk_vec[j] = Tk; } Element e1; e1 = new Element() { ID = 1, ElementType = new Shell8NonLinear(material2, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) { oVn_i = VH, tk = Tk_vec, } }; e1.NodesDictionary.Add(8, model.NodesDictionary[8]); e1.NodesDictionary.Add(3, model.NodesDictionary[3]); e1.NodesDictionary.Add(1, model.NodesDictionary[1]); e1.NodesDictionary.Add(6, model.NodesDictionary[6]); e1.NodesDictionary.Add(5, model.NodesDictionary[5]); e1.NodesDictionary.Add(2, model.NodesDictionary[2]); e1.NodesDictionary.Add(4, model.NodesDictionary[4]); e1.NodesDictionary.Add(7, model.NodesDictionary[7]); model.ElementsDictionary.Add(e1.ID, e1); model.SubdomainsDictionary[subdomainID].Elements.Add(e1); //eisagwgh shell ews edw // eisagwgh tou cohesive element int[] coh_global_nodes; coh_global_nodes = new int[] { 8, 3, 1, 6, 5, 2, 4, 7, 16, 11, 9, 14, 13, 10, 12, 15 }; Element e2; e2 = new Element() { ID = 2, ElementType = new CohesiveShell8ToHexa20(material1, GaussLegendre2D.GetQuadratureWithOrder(3, 3)) { oVn_i = VH, tk = Tk_vec, ShellElementSide = 0, } }; for (int j = 0; j < 16; j++) { e2.NodesDictionary.Add(coh_global_nodes[j], model.NodesDictionary[coh_global_nodes[j]]); } model.ElementsDictionary.Add(e2.ID, e2); model.SubdomainsDictionary[subdomainID].Elements.Add(e2); // eisagwgh cohesive ews edw // perioxh loads double value_ext; value_ext = 2 * 2.5 * 0.5; int[] points_with_negative_load; points_with_negative_load = new int[] { 1, 3, 6, 8 }; int[] points_with_positive_load; points_with_positive_load = new int[] { 2, 4, 5, 7 }; Load load1; Load load2; // LOADCASE '' orthi '' //for (int j = 0; j < 4; j++) //{ // load1 = new Load() // { // Node = model.NodesDictionary[points_with_negative_load[j]], // DOF = DOFType.Z, // Amount = -0.3333333 * value_ext, // }; // model.Loads.Add(load1); // load2 = new Load() // { // Node = model.NodesDictionary[points_with_positive_load[j]], // DOF = DOFType.Z, // Amount = 1.3333333 * value_ext, // }; // model.Loads.Add(load2); //} // LOADCASE '' orthi '' dixws ta duo prwta fortia (-0.3333) kai (1.3333) for (int j = 0; j < 3; j++) { load1 = new Load() { Node = model.NodesDictionary[points_with_negative_load[j + 1]], DOF = StructuralDof.TranslationZ, Amount = -0.3333333 * value_ext, }; model.Loads.Add(load1); load2 = new Load() { Node = model.NodesDictionary[points_with_positive_load[j + 1]], DOF = StructuralDof.TranslationZ, Amount = 1.3333333 * value_ext, }; model.Loads.Add(load2); } // perioxh loads ews edw }
private static void BuildCantileverModel(Model model, double load_value) { //xrhsimopoiithike to ParadeigmataElegxwnBuilder.HexaCantileverBuilder(Model model, double load_value) // allagh tou element kai tou material //ElasticMaterial3DTemp material1 = new ElasticMaterial3DTemp() //{ // YoungModulus = 1353000, // PoissonRatio = 0.3, //}; //VonMisesMaterial3D material1 = new VonMisesMaterial3D(1353000, 0.30, 1353000, 0.15); IContinuumMaterial3DDefGrad material1 = new ElasticMaterial3DDefGrad() { PoissonRatio = 0.3, YoungModulus = 1353000 }; double[,] nodeData = new double[, ] { { -0.250000, -0.250000, -1.000000 }, { 0.250000, -0.250000, -1.000000 }, { -0.250000, 0.250000, -1.000000 }, { 0.250000, 0.250000, -1.000000 }, { -0.250000, -0.250000, -0.500000 }, { 0.250000, -0.250000, -0.500000 }, { -0.250000, 0.250000, -0.500000 }, { 0.250000, 0.250000, -0.500000 }, { -0.250000, -0.250000, 0.000000 }, { 0.250000, -0.250000, 0.000000 }, { -0.250000, 0.250000, 0.000000 }, { 0.250000, 0.250000, 0.000000 }, { -0.250000, -0.250000, 0.500000 }, { 0.250000, -0.250000, 0.500000 }, { -0.250000, 0.250000, 0.500000 }, { 0.250000, 0.250000, 0.500000 }, { -0.250000, -0.250000, 1.000000 }, { 0.250000, -0.250000, 1.000000 }, { -0.250000, 0.250000, 1.000000 }, { 0.250000, 0.250000, 1.000000 } }; int[,] elementData = new int[, ] { { 1, 8, 7, 5, 6, 4, 3, 1, 2 }, { 2, 12, 11, 9, 10, 8, 7, 5, 6 }, { 3, 16, 15, 13, 14, 12, 11, 9, 10 }, { 4, 20, 19, 17, 18, 16, 15, 13, 14 }, }; // orismos shmeiwn for (int nNode = 0; nNode < nodeData.GetLength(0); nNode++) { model.NodesDictionary.Add(nNode + 1, new Node(id: nNode + 1, x: nodeData[nNode, 0], y: nodeData[nNode, 1], z: nodeData[nNode, 2])); } // orismos elements Element e1; int subdomainID = 1; for (int nElement = 0; nElement < elementData.GetLength(0); nElement++) { e1 = new Element() { ID = nElement + 1, ElementType = new Hexa8NonLinearDefGrad(material1, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) // dixws to e. exoume sfalma enw sto beambuilding oxi//edw kaleitai me ena orisma to Hexa8 }; for (int j = 0; j < 8; j++) { e1.NodesDictionary.Add(elementData[nElement, j + 1], model.NodesDictionary[elementData[nElement, j + 1]]); } model.ElementsDictionary.Add(e1.ID, e1); model.SubdomainsDictionary[subdomainID].Elements.Add(e1); } // constraint vashh opou z=-1 for (int k = 1; k < 5; k++) { model.NodesDictionary[k].Constraints.Add(new Constraint() { Amount = 0, DOF = StructuralDof.TranslationX }); model.NodesDictionary[k].Constraints.Add(new Constraint() { Amount = 0, DOF = StructuralDof.TranslationY }); model.NodesDictionary[k].Constraints.Add(new Constraint() { Amount = 0, DOF = StructuralDof.TranslationZ }); } // fortish korufhs Load load1; for (int k = 17; k < 21; k++) { load1 = new Load() { Node = model.NodesDictionary[k], DOF = StructuralDof.TranslationX, Amount = 1 * load_value }; model.Loads.Add(load1); } }
static ThermalElement3DFactory() { var interpolations = new Dictionary <CellType, IIsoparametricInterpolation3D>(); var integrationsForStiffness = new Dictionary <CellType, IQuadrature3D>(); var integrationsForMass = new Dictionary <CellType, IQuadrature3D>(); var extrapolations = new Dictionary <CellType, IGaussPointExtrapolation3D>(); // Tet4 // TODO: implementations for Tet4 interpolations.Add(CellType.Tet4, InterpolationTet4.UniqueInstance); integrationsForStiffness.Add(CellType.Tet4, TetrahedronQuadrature.Order1Point1); integrationsForMass.Add(CellType.Tet4, TetrahedronQuadrature.Order2Points4); extrapolations.Add(CellType.Tet4, null); // Tet10 // TODO: implementations for Tet10 interpolations.Add(CellType.Tet10, InterpolationTet10.UniqueInstance); integrationsForStiffness.Add(CellType.Tet10, TetrahedronQuadrature.Order2Points4); integrationsForMass.Add(CellType.Tet10, TetrahedronQuadrature.Order5Points15); extrapolations.Add(CellType.Tet10, null); // Hexa8 interpolations.Add(CellType.Hexa8, InterpolationHexa8.UniqueInstance); integrationsForStiffness.Add(CellType.Hexa8, GaussLegendre3D.GetQuadratureWithOrder(2, 2, 2)); integrationsForMass.Add(CellType.Hexa8, GaussLegendre3D.GetQuadratureWithOrder(2, 2, 2)); extrapolations.Add(CellType.Hexa8, ExtrapolationGaussLegendre2x2x2.UniqueInstance); // Hexa20 // TODO: extrapolations for Hexa20 interpolations.Add(CellType.Hexa20, InterpolationHexa20.UniqueInstance); integrationsForStiffness.Add(CellType.Hexa20, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)); integrationsForMass.Add(CellType.Hexa20, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)); extrapolations.Add(CellType.Hexa20, null); // Hexa27 // TODO: extrapolations for Hexa27 interpolations.Add(CellType.Hexa27, InterpolationHexa27.UniqueInstance); integrationsForStiffness.Add(CellType.Hexa27, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)); integrationsForMass.Add(CellType.Hexa27, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)); extrapolations.Add(CellType.Hexa27, null); // Wedge6 // TODO: implementations for Wedge6 interpolations.Add(CellType.Wedge6, InterpolationWedge6.UniqueInstance); integrationsForStiffness.Add(CellType.Wedge6, WedgeQuadrature.Points6); integrationsForMass.Add(CellType.Wedge6, WedgeQuadrature.Points8); extrapolations.Add(CellType.Wedge6, null); // Wedge15 // TODO: implementations for Wedge15 interpolations.Add(CellType.Wedge15, InterpolationWedge15.UniqueInstance); integrationsForStiffness.Add(CellType.Wedge15, WedgeQuadrature.Points8); integrationsForMass.Add(CellType.Wedge15, WedgeQuadrature.Points21); extrapolations.Add(CellType.Wedge15, null); // Wedge18 // TODO: implementations for Wedge18 interpolations.Add(CellType.Wedge18, InterpolationWedge18.UniqueInstance); integrationsForStiffness.Add(CellType.Wedge18, WedgeQuadrature.Points8); integrationsForMass.Add(CellType.Wedge18, WedgeQuadrature.Points21); extrapolations.Add(CellType.Wedge18, null); // Pyra5 // TODO: implementations for Pyra5 interpolations.Add(CellType.Pyra5, InterpolationPyra5.UniqueInstance); integrationsForStiffness.Add(CellType.Pyra5, PyramidQuadrature.Points5); integrationsForMass.Add(CellType.Pyra5, PyramidQuadrature.Points5); extrapolations.Add(CellType.Pyra5, null); // Pyra13 // TODO: implementations for Pyra13 interpolations.Add(CellType.Pyra13, InterpolationPyra13.UniqueInstance); integrationsForStiffness.Add(CellType.Pyra13, PyramidQuadrature.Points6); integrationsForMass.Add(CellType.Pyra13, PyramidQuadrature.Points6); extrapolations.Add(CellType.Pyra13, null); // Pyra14 // TODO: implementations for Pyra14 interpolations.Add(CellType.Pyra14, InterpolationPyra14.UniqueInstance); integrationsForStiffness.Add(CellType.Pyra14, PyramidQuadrature.Points6); integrationsForMass.Add(CellType.Pyra14, PyramidQuadrature.Points6); extrapolations.Add(CellType.Pyra14, null); ThermalElement3DFactory.interpolations = interpolations; ThermalElement3DFactory.integrationsForStiffness = integrationsForStiffness; ThermalElement3DFactory.integrationsForMass = integrationsForMass; ThermalElement3DFactory.extrapolations = extrapolations; }
private static void BuildCantileverModel(Model model, double load_value) { var material1 = new ElasticMaterial3D() { PoissonRatio = 0.3, YoungModulus = 1353000 }; double[,] nodeData = new double[, ] { //{-0.250000,-0.250000,-1.000000}, {0.250000,-0.250000,-1.000000}, {-0.250000,0.250000,-1.000000}, {0.250000,0.250000,-1.000000}, //{-0.250000,-0.250000,-0.500000}, {0.250000,-0.250000,-0.500000}, {-0.250000,0.250000,-0.500000}, {0.250000,0.250000,-0.500000}, //{-0.250000,-0.250000,0.000000}, {0.250000,-0.250000,0.000000}, {-0.250000,0.250000,0.000000}, {0.250000,0.250000,0.000000}, //{-0.250000,-0.250000,0.500000}, {0.250000,-0.250000,0.500000}, {-0.250000,0.250000,0.500000}, {0.250000,0.250000,0.500000}, //{-0.250000,-0.250000,1.000000}, {0.250000,-0.250000,1.000000}, {-0.250000,0.250000,1.000000}, {0.250000,0.250000,1.000000}, //}; { -0.250000, -0.250000, -2.000000 }, { 0.250000, -0.250000, -2.000000 }, { -0.250000, 0.250000, -2.000000 }, { 0.250000, 0.250000, -2.000000 }, { -0.250000, -0.250000, -1.500000 }, { 0.250000, -0.250000, -1.500000 }, { -0.250000, 0.250000, -1.500000 }, { 0.250000, 0.250000, -1.500000 }, { -0.250000, -0.250000, -1.000000 }, { 0.250000, -0.250000, -1.000000 }, { -0.250000, 0.250000, -1.000000 }, { 0.250000, 0.250000, -1.000000 }, { -0.250000, -0.250000, -0.500000 }, { 0.250000, -0.250000, -0.500000 }, { -0.250000, 0.250000, -0.500000 }, { 0.250000, 0.250000, -0.500000 }, { -0.250000, -0.250000, 0.000000 }, { 0.250000, -0.250000, 0.000000 }, { -0.250000, 0.250000, 0.000000 }, { 0.250000, 0.250000, 0.000000 }, { -0.250000, -0.250000, 0.500000 }, { 0.250000, -0.250000, 0.500000 }, { -0.250000, 0.250000, 0.500000 }, { 0.250000, 0.250000, 0.500000 }, { -0.250000, -0.250000, 1.000000 }, { 0.250000, -0.250000, 1.000000 }, { -0.250000, 0.250000, 1.000000 }, { 0.250000, 0.250000, 1.000000 }, { -0.250000, -0.250000, 1.500000 }, { 0.250000, -0.250000, 1.500000 }, { -0.250000, 0.250000, 1.500000 }, { 0.250000, 0.250000, 1.500000 }, { -0.250000, -0.250000, 2.000000 }, { 0.250000, -0.250000, 2.000000 }, { -0.250000, 0.250000, 2.000000 }, { 0.250000, 0.250000, 2.000000 }, }; int[,] elementData = new int[, ] { //{1,8,7,5,6,4,3,1,2}, //{2,12,11,9,10,8,7,5,6}, //{3,16,15,13,14,12,11,9,10}, //{4,20,19,17,18,16,15,13,14}, { 1, 8, 7, 5, 6, 4, 3, 1, 2 }, { 2, 12, 11, 9, 10, 8, 7, 5, 6 }, { 3, 16, 15, 13, 14, 12, 11, 9, 10 }, { 4, 20, 19, 17, 18, 16, 15, 13, 14 }, { 5, 24, 23, 21, 22, 20, 19, 17, 18 }, { 6, 28, 27, 25, 26, 24, 23, 21, 22 }, { 7, 32, 31, 29, 30, 28, 27, 25, 26 }, { 8, 36, 35, 33, 34, 32, 31, 29, 30 }, }; // Put nodes and nodal coordinates in model for (int nNode = 0; nNode < nodeData.GetLength(0); nNode++) { model.NodesDictionary.Add(nNode + 1, new Node(id: nNode + 1, x: nodeData[nNode, 0], y: nodeData[nNode, 1], z: nodeData[nNode, 2])); } // Define elements Element e1; int subdomainID = Hexa8NonLinearCantilever.subdomainID; for (int nElement = 0; nElement < elementData.GetLength(0); nElement++) { e1 = new Element() { ID = nElement + 1, ElementType = new Hexa8NonLinear(material1, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) // dixws to e. exoume sfalma enw sto beambuilding oxi//edw kaleitai me ena orisma to Hexa8 }; for (int j = 0; j < 8; j++) { e1.NodesDictionary.Add(elementData[nElement, j + 1], model.NodesDictionary[elementData[nElement, j + 1]]); } model.ElementsDictionary.Add(e1.ID, e1); model.SubdomainsDictionary[subdomainID].Elements.Add(e1.ID, e1); } // Constrain nodes at z = -1 for (int k = 1; k <= 4; k++) { model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); } // Top load Load load1; //for (int k = 17; k <= 20; k++) for (int k = 33; k <= 36; k++) { load1 = new Load() { Node = model.NodesDictionary[k], DOF = StructuralDof.TranslationY, Amount = 1 * load_value }; model.Loads.Add(load1); } }
public static void HexaCantileverBuilder_copyMS_222(Model model, double load_value) { //Origin: ParadeigmataElegxwnBuilder.HexaCantileverBuilder_copyMS_222(Model model, double load_value) IRVEbuilder homogeneousRveBuilder1 = new HomogeneousRVEBuilderNonLinear(); IContinuumMaterial3DDefGrad material1 = new MicrostructureDefGrad3D(homogeneousRveBuilder1, m => (new SkylineSolver.Builder()).BuildSolver(m), false, 1); double[,] nodeData = new double[, ] { { -0.250000, -0.250000, -1.000000 }, { 0.250000, -0.250000, -1.000000 }, { -0.250000, 0.250000, -1.000000 }, { 0.250000, 0.250000, -1.000000 }, { -0.250000, -0.250000, -0.500000 }, { 0.250000, -0.250000, -0.500000 }, { -0.250000, 0.250000, -0.500000 }, { 0.250000, 0.250000, -0.500000 }, { -0.250000, -0.250000, 0.000000 }, { 0.250000, -0.250000, 0.000000 }, { -0.250000, 0.250000, 0.000000 }, { 0.250000, 0.250000, 0.000000 }, { -0.250000, -0.250000, 0.500000 }, { 0.250000, -0.250000, 0.500000 }, { -0.250000, 0.250000, 0.500000 }, { 0.250000, 0.250000, 0.500000 }, { -0.250000, -0.250000, 1.000000 }, { 0.250000, -0.250000, 1.000000 }, { -0.250000, 0.250000, 1.000000 }, { 0.250000, 0.250000, 1.000000 } }; int[,] elementData = new int[, ] { { 1, 8, 7, 5, 6, 4, 3, 1, 2 }, { 2, 12, 11, 9, 10, 8, 7, 5, 6 }, { 3, 16, 15, 13, 14, 12, 11, 9, 10 }, { 4, 20, 19, 17, 18, 16, 15, 13, 14 }, }; // orismos shmeiwn for (int nNode = 0; nNode < nodeData.GetLength(0); nNode++) { model.NodesDictionary.Add(nNode + 1, new Node(id: nNode + 1, x: nodeData[nNode, 0], y: nodeData[nNode, 1], z: nodeData[nNode, 2])); } // orismos elements Element e1; int subdomainID = 1; for (int nElement = 0; nElement < elementData.GetLength(0); nElement++) { e1 = new Element() { ID = nElement + 1, ElementType = new Hexa8NonLinearDefGrad(material1, GaussLegendre3D.GetQuadratureWithOrder(2, 2, 2)) // dixws to e. exoume sfalma enw sto beambuilding oxi//edw kaleitai me ena orisma to Hexa8 }; for (int j = 0; j < 8; j++) { e1.NodesDictionary.Add(elementData[nElement, j + 1], model.NodesDictionary[elementData[nElement, j + 1]]); } model.ElementsDictionary.Add(e1.ID, e1); model.SubdomainsDictionary[subdomainID].Elements.Add(e1); } // constraint vashh opou z=-1 for (int k = 1; k < 5; k++) { model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); } // fortish korufhs Load load1; for (int k = 17; k < 21; k++) { load1 = new Load() { Node = model.NodesDictionary[k], DOF = StructuralDof.TranslationX, Amount = 1 * load_value }; model.Loads.Add(load1); } }
public static void HostElementsBuilder(Model model) { // Nodes Geometry model.NodesDictionary.Add(1, new Node(id: 1, x: 10.00, y: 2.50, z: 2.50)); model.NodesDictionary.Add(2, new Node(id: 2, x: 0.00, y: 2.50, z: 2.50)); model.NodesDictionary.Add(3, new Node(id: 3, x: 0.00, y: -2.50, z: 2.50)); model.NodesDictionary.Add(4, new Node(id: 4, x: 10.00, y: -2.50, z: 2.50)); model.NodesDictionary.Add(5, new Node(id: 5, x: 10.00, y: 2.50, z: -2.50)); model.NodesDictionary.Add(6, new Node(id: 6, x: 0.00, y: 2.50, z: -2.50)); model.NodesDictionary.Add(7, new Node(id: 7, x: 0.00, y: -2.50, z: -2.50)); model.NodesDictionary.Add(8, new Node(id: 8, x: 10.00, y: -2.50, z: -2.50)); // Boundary Conditions model.NodesDictionary[2].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[2].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[2].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); model.NodesDictionary[3].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[3].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[3].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); model.NodesDictionary[6].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[6].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[6].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); model.NodesDictionary[7].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[7].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[7].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); // Create Material var solidMaterial = new ElasticMaterial3D() { YoungModulus = 3.76, PoissonRatio = 0.3779, }; DynamicMaterial DynamicMaterial = new DynamicMaterial(1, 0, 0); var factory = new ContinuumElement3DFactory(solidMaterial, DynamicMaterial); // Hexa8NL element definition List <Node> nodeSet = new List <Node>(8); for (int j = 1; j < 9; j++) { nodeSet.Add((Node)model.NodesDictionary[j]); } var hexa8NLelement = new Element() { ID = 1, ElementType = // factory.CreateNonLinearElement(CellType.Hexa8, nodeSet, solidMaterial, DynamicMaterial) new Hexa8NonLinear(solidMaterial, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) // = new ContinummElement3DNonLinear(nodeSet, solidMaterial, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3), ISAAR.MSolve.FEM.Interpolation.InterpolationHexa8.UniqueInstance) }; // Add nodes to the created element hexa8NLelement.AddNode(model.NodesDictionary[1]); hexa8NLelement.AddNode(model.NodesDictionary[2]); hexa8NLelement.AddNode(model.NodesDictionary[3]); hexa8NLelement.AddNode(model.NodesDictionary[4]); hexa8NLelement.AddNode(model.NodesDictionary[5]); hexa8NLelement.AddNode(model.NodesDictionary[6]); hexa8NLelement.AddNode(model.NodesDictionary[7]); hexa8NLelement.AddNode(model.NodesDictionary[8]); // Add Hexa element to the element and subdomains dictionary of the model model.ElementsDictionary.Add(hexa8NLelement.ID, hexa8NLelement); model.SubdomainsDictionary[1].Elements.Add(hexa8NLelement); // Add nodal load values at the top nodes of the model model.Loads.Add(new Load() { Amount = 25, Node = model.NodesDictionary[1], DOF = StructuralDof.TranslationZ }); model.Loads.Add(new Load() { Amount = 25, Node = model.NodesDictionary[4], DOF = StructuralDof.TranslationZ }); model.Loads.Add(new Load() { Amount = 25, Node = model.NodesDictionary[5], DOF = StructuralDof.TranslationZ }); model.Loads.Add(new Load() { Amount = 25, Node = model.NodesDictionary[8], DOF = StructuralDof.TranslationZ }); }
private static void BuildCantileverModel(Model model, double load_value) { //xrhsimopoiithike to Hexa8NonLinearCantileverDefGrad // allagh tou material IContinuumMaterial3DDefGrad material1 = new HyperElasticMaterial3DDefGrad() { C1 = 0.035, C2 = 0.057, k_cons = 1 }; double[,] nodeData = new double[, ] { { 1, -1, -1 }, { 1, 1, -1 }, { 1, -1, 1 }, { 1, 1, 1 }, { -1, -1, -1 }, { -1, 1, -1 }, { -1, -1, 1 }, { -1, 1, 1 } }; int[,] elementData = new int[, ] { { 1, 4, 8, 7, 3, 2, 6, 5, 1 }, { 2, 12, 11, 9, 10, 8, 7, 5, 6 } }; // the last line will not be used. We assign only one element // orismos shmeiwn for (int nNode = 0; nNode < nodeData.GetLength(0); nNode++) { model.NodesDictionary.Add(nNode + 1, new Node(id: nNode + 1, x: nodeData[nNode, 0], y: nodeData[nNode, 1], z: nodeData[nNode, 2])); } // orismos elements Element e1; int subdomainID = 1; for (int nElement = 0; nElement < elementData.GetLength(0) - 1; nElement++) { e1 = new Element() { ID = nElement + 1, ElementType = new Hexa8NonLinearDefGrad(material1, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) // dixws to e. exoume sfalma enw sto beambuilding oxi//edw kaleitai me ena orisma to Hexa8 }; for (int j = 0; j < 8; j++) { e1.NodesDictionary.Add(elementData[nElement, j + 1], model.NodesDictionary[elementData[nElement, j + 1]]); } model.ElementsDictionary.Add(e1.ID, e1); model.SubdomainsDictionary[subdomainID].Elements.Add(e1); } // constraint to to deftero miso apo th list twn nodes foreach (int k in new int[] { 5, 6, 7, 8 }) { model.NodesDictionary[k].Constraints.Add(new Constraint() { Amount = 0, DOF = StructuralDof.TranslationX }); model.NodesDictionary[k].Constraints.Add(new Constraint() { Amount = 0, DOF = StructuralDof.TranslationY }); model.NodesDictionary[k].Constraints.Add(new Constraint() { Amount = 0, DOF = StructuralDof.TranslationZ }); } // fortish korufhs Load load1; for (int k = 4; k < 5; k++) { load1 = new Load() { Node = model.NodesDictionary[k], DOF = StructuralDof.TranslationZ, Amount = 1 * load_value }; model.Loads.Add(load1); } }
public static void MatrixModelBuilder(Model model) { string workingDirectory = @"E:\GEORGE_DATA\DESKTOP\input files"; //@"D:\George\Desktop\input files"; // string MatrixGeometryFileName = "MATRIX_3D-L_x=10-L_y=10-L_z=100-1x1x10-Geometry_EBE_MSolve.inp"; //"MATRIX_3D-L_x=30-L_y=30-L_z=100-3x3x10-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=10-L_y=10-L_z=100-1x1x10-Geometry_EBE_MSolve.inp"; string MatrixGonnectivityFileName = "MATRIX_3D-L_x=10-L_y=10-L_z=100-1x1x10-ConnMatr_EBE_MSolve.inp"; //"MATRIX_3D-L_x=30-L_y=30-L_z=100-3x3x10-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=10-L_y=10-L_z=100-1x1x10-ConnMatr_EBE_MSolve.inp"; int matrixNodes = File.ReadLines(workingDirectory + '\\' + MatrixGeometryFileName).Count(); int matrixElements = File.ReadLines(workingDirectory + '\\' + MatrixGonnectivityFileName).Count(); // Nodes Geometry using (TextReader reader = File.OpenText(workingDirectory + '\\' + MatrixGeometryFileName)) { for (int i = 0; i < matrixNodes; i++) { string text = reader.ReadLine(); string[] bits = text.Split(','); int nodeID = int.Parse(bits[0]); double nodeX = double.Parse(bits[1]); double nodeY = double.Parse(bits[2]); double nodeZ = double.Parse(bits[3]); model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: nodeX, y: nodeY, z: nodeZ)); } } // Create Material var solidMaterial = new ElasticMaterial3D() { YoungModulus = 1.00, PoissonRatio = 0.30, }; // Generate elements using (TextReader reader = File.OpenText(workingDirectory + '\\' + MatrixGonnectivityFileName)) { for (int i = 0; i < matrixElements; i++) { string text = reader.ReadLine(); string[] bits = text.Split(','); int elementID = int.Parse(bits[0]); int node1 = int.Parse(bits[1]); int node2 = int.Parse(bits[2]); int node3 = int.Parse(bits[3]); int node4 = int.Parse(bits[4]); int node5 = int.Parse(bits[5]); int node6 = int.Parse(bits[6]); int node7 = int.Parse(bits[7]); int node8 = int.Parse(bits[8]); // Hexa8NL element definition var hexa8NLelement = new Element() { ID = elementID, ElementType = new Hexa8NonLinear(solidMaterial, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) }; // Add nodes to the created element hexa8NLelement.AddNode(model.NodesDictionary[node1]); hexa8NLelement.AddNode(model.NodesDictionary[node2]); hexa8NLelement.AddNode(model.NodesDictionary[node3]); hexa8NLelement.AddNode(model.NodesDictionary[node4]); hexa8NLelement.AddNode(model.NodesDictionary[node5]); hexa8NLelement.AddNode(model.NodesDictionary[node6]); hexa8NLelement.AddNode(model.NodesDictionary[node7]); hexa8NLelement.AddNode(model.NodesDictionary[node8]); // Add Hexa element to the element and subdomains dictionary of the model model.ElementsDictionary.Add(hexa8NLelement.ID, hexa8NLelement); //model.SubdomainsDictionary[0].ElementsDictionary.Add(hexa8NLelement.ID, hexa8NLelement); model.SubdomainsDictionary[0].Elements.Add(hexa8NLelement); } } // Boundary Conditions - Left End [End-1] for (int iNode = 1; iNode <= 4; iNode++) { //model.NodesDictionary[iNode].Constraints.Add(new Constraint { DOF = DOFType.X }); //model.NodesDictionary[iNode].Constraints.Add(new Constraint { DOF = DOFType.Y }); model.NodesDictionary[iNode].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); } // Boundary Conditions - Bottom End [End-3] for (int iNode = 1; iNode <= 41; iNode += 4) { for (int j = 0; j < 2; j++) { model.NodesDictionary[iNode + j].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); } } // Boundary Conditions - Bottom End [End-5] for (int iNode = 1; iNode <= 43; iNode += 2) { model.NodesDictionary[iNode].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); } // Boundary Conditions - Bottom End [End-6] for (int iNode = 2; iNode <= 44; iNode += 2) { model.NodesDictionary[iNode].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); } // Add nodal load values at the top nodes of the model //for (int iNode = 161; iNode <= 164; iNode++) //(int iNode = 338001; iNode <= 338026; iNode++) //(int iNode = 3601; iNode <= 3606; iNode++) //(int iNode = 2603551; iNode < 2603601; iNode++) //{ // model.Loads.Add(new Load() { Amount = nodalLoad, Node = model.NodesDictionary[iNode], DOF = DOFType.Y }); //} //model.Loads.Add(new Load() { Amount = nodalLoad, Node = model.NodesDictionary[1801], DOF = DOFType.Y }); //model.Loads.Add(new Load() { Amount = 2, Node = model.NodesDictionary[1802], DOF = DOFType.Y }); //model.Loads.Add(new Load() { Amount = 2, Node = model.NodesDictionary[1803], DOF = DOFType.Y }); //model.Loads.Add(new Load() { Amount = 2, Node = model.NodesDictionary[1804], DOF = DOFType.Y }); //model.Loads.Add(new Load() { Amount = 2, Node = model.NodesDictionary[1805], DOF = DOFType.Y }); //model.Loads.Add(new Load() { Amount = nodalLoad, Node = model.NodesDictionary[1806], DOF = DOFType.Y }); // Compression Loading double nodalLoad = -25.0; //0.40; for (int iNode = 41; iNode <= 44; iNode++) //[End-4] { model.Loads.Add(new Load() { Amount = nodalLoad, Node = model.NodesDictionary[iNode], DOF = StructuralDof.TranslationZ }); } //// Applied Displacements //double nodalDisplacement = -10.0; //for (int iNode = 41; iNode <= 44; iNode++) //[End-4] //{ // model.NodesDictionary[iNode].Constraints.Add(new Constraint { DOF = DOFType.Z, Amount = nodalDisplacement }); //} }
private static void BuildCantileverModel(Model model, double load_value) { //xrhsimopoiithike to ParadeigmataElegxwnBuilder.HexaCantileverBuilder(Model model, double load_value) // allagh tou element kai tou material //ElasticMaterial3DTemp material1 = new ElasticMaterial3DTemp() //{ // YoungModulus = 1353000, // PoissonRatio = 0.3, //}; //VonMisesMaterial3D material1 = new VonMisesMaterial3D(1353000, 0.30, 1353000, 0.15); var material1 = new ElasticMaterial3D() { PoissonRatio = 0.3, YoungModulus = 1353000 }; double[,] nodeData = new double[, ] { { -0.250000, -0.250000, -1.000000 }, { 0.250000, -0.250000, -1.000000 }, { -0.250000, 0.250000, -1.000000 }, { 0.250000, 0.250000, -1.000000 }, { -0.250000, -0.250000, -0.500000 }, { 0.250000, -0.250000, -0.500000 }, { -0.250000, 0.250000, -0.500000 }, { 0.250000, 0.250000, -0.500000 }, { -0.250000, -0.250000, 0.000000 }, { 0.250000, -0.250000, 0.000000 }, { -0.250000, 0.250000, 0.000000 }, { 0.250000, 0.250000, 0.000000 }, { -0.250000, -0.250000, 0.500000 }, { 0.250000, -0.250000, 0.500000 }, { -0.250000, 0.250000, 0.500000 }, { 0.250000, 0.250000, 0.500000 }, { -0.250000, -0.250000, 1.000000 }, { 0.250000, -0.250000, 1.000000 }, { -0.250000, 0.250000, 1.000000 }, { 0.250000, 0.250000, 1.000000 } }; int[,] elementData = new int[, ] { { 1, 8, 7, 5, 6, 4, 3, 1, 2 }, { 2, 12, 11, 9, 10, 8, 7, 5, 6 }, { 3, 16, 15, 13, 14, 12, 11, 9, 10 }, { 4, 20, 19, 17, 18, 16, 15, 13, 14 }, }; // orismos shmeiwn for (int nNode = 0; nNode < nodeData.GetLength(0); nNode++) { model.NodesDictionary.Add(nNode + 1, new Node(id: nNode + 1, x: nodeData[nNode, 0], y: nodeData[nNode, 1], z: nodeData[nNode, 2])); } // orismos elements Element e1; int subdomainID = Hexa8ContinuumNonLinearCantilever.subdomainID; for (int nElement = 0; nElement < elementData.GetLength(0); nElement++) { DynamicMaterial DynamicMaterial = new DynamicMaterial(1, 0, 0); //Dictionary<int,Node3D > List <Node> nodeSet = new List <Node>(8); for (int j = 0; j < 8; j++) { int nodeID = elementData[nElement, j]; nodeSet.Add((Node)model.NodesDictionary[nodeID]); } var factory = new ContinuumElement3DFactory(material1, DynamicMaterial); e1 = new Element() { ID = nElement + 1, ElementType //factory.CreateNonLinearElement(CellType.Hexa8, nodeSet, material1, DynamicMaterial) //new ContinummElement3DNonLinear(nodeSet, material1, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3), InterpolationHexa8Reversed.UniqueInstance)// dixws to e. exoume sfalma enw sto beambuilding oxi//edw kaleitai me ena orisma to Hexa8 = new ContinuumElement3DNonLinear(nodeSet, material1, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3), InterpolationHexa8.UniqueInstance), }; for (int j = 0; j < 8; j++) { e1.NodesDictionary.Add(elementData[nElement, j + 1], model.NodesDictionary[elementData[nElement, j + 1]]); } model.ElementsDictionary.Add(e1.ID, e1); model.SubdomainsDictionary[subdomainID].Elements.Add(e1); } // constraint vashh opou z=-1 for (int k = 1; k < 5; k++) { model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); } // fortish korufhs Load load1; for (int k = 17; k < 21; k++) { load1 = new Load() { Node = model.NodesDictionary[k], DOF = StructuralDof.TranslationX, Amount = 1 * load_value }; model.Loads.Add(load1); } }
private static void ShellPlateBuilder(Model model, double load_value) { // Origin: branch master idio onoma ParadeigmataElegxwnBuilder2.ShellPlateBuilder(Model model, double load_value) var material1 = new ShellElasticMaterial3D() { YoungModulus = 135300, PoissonRatio = 0.3, ShearCorrectionCoefficientK = 5 / 6, }; double[,] nodeData = new double[, ] { { 10.000000, 10.000000, 0.000000 }, { 7.500000, 10.000000, 0.000000 }, { 5.000000, 10.000000, 0.000000 }, { 2.500000, 10.000000, 0.000000 }, { 0.000000, 10.000000, 0.000000 }, { 10.000000, 7.500000, 0.000000 }, { 7.500000, 7.500000, 0.000000 }, { 5.000000, 7.500000, 0.000000 }, { 2.500000, 7.500000, 0.000000 }, { 0.000000, 7.500000, 0.000000 }, { 10.000000, 5.000000, 0.000000 }, { 7.500000, 5.000000, 0.000000 }, { 5.000000, 5.000000, 0.000000 }, { 2.500000, 5.000000, 0.000000 }, { 0.000000, 5.000000, 0.000000 }, { 10.000000, 2.500000, 0.000000 }, { 7.500000, 2.500000, 0.000000 }, { 5.000000, 2.500000, 0.000000 }, { 2.500000, 2.500000, 0.000000 }, { 0.000000, 2.500000, 0.000000 }, { 10.000000, 0.000000, 0.000000 }, { 7.500000, 0.000000, 0.000000 }, { 5.000000, 0.000000, 0.000000 }, { 2.500000, 0.000000, 0.000000 }, { 0.000000, 0.000000, 0.000000 }, { 8.750000, 10.000000, 0.000000 }, { 6.250000, 10.000000, 0.000000 }, { 3.750000, 10.000000, 0.000000 }, { 1.250000, 10.000000, 0.000000 }, { 8.750000, 7.500000, 0.000000 }, { 6.250000, 7.500000, 0.000000 }, { 3.750000, 7.500000, 0.000000 }, { 1.250000, 7.500000, 0.000000 }, { 8.750000, 5.000000, 0.000000 }, { 6.250000, 5.000000, 0.000000 }, { 3.750000, 5.000000, 0.000000 }, { 1.250000, 5.000000, 0.000000 }, { 8.750000, 2.500000, 0.000000 }, { 6.250000, 2.500000, 0.000000 }, { 3.750000, 2.500000, 0.000000 }, { 1.250000, 2.500000, 0.000000 }, { 8.750000, 0.000000, 0.000000 }, { 6.250000, 0.000000, 0.000000 }, { 3.750000, 0.000000, 0.000000 }, { 1.250000, 0.000000, 0.000000 }, { 10.000000, 8.750000, 0.000000 }, { 10.000000, 6.250000, 0.000000 }, { 10.000000, 3.750000, 0.000000 }, { 10.000000, 1.250000, 0.000000 }, { 7.500000, 8.750000, 0.000000 }, { 7.500000, 6.250000, 0.000000 }, { 7.500000, 3.750000, 0.000000 }, { 7.500000, 1.250000, 0.000000 }, { 5.000000, 8.750000, 0.000000 }, { 5.000000, 6.250000, 0.000000 }, { 5.000000, 3.750000, 0.000000 }, { 5.000000, 1.250000, 0.000000 }, { 2.500000, 8.750000, 0.000000 }, { 2.500000, 6.250000, 0.000000 }, { 2.500000, 3.750000, 0.000000 }, { 2.500000, 1.250000, 0.000000 }, { 0.000000, 8.750000, 0.000000 }, { 0.000000, 6.250000, 0.000000 }, { 0.000000, 3.750000, 0.000000 }, { 0.000000, 1.250000, 0.000000 }, }; int[,] elementData = new int[, ] { { 1, 1, 2, 7, 6, 26, 50, 30, 46 }, { 2, 2, 3, 8, 7, 27, 54, 31, 50 }, { 3, 3, 4, 9, 8, 28, 58, 32, 54 }, { 4, 4, 5, 10, 9, 29, 62, 33, 58 }, { 5, 6, 7, 12, 11, 30, 51, 34, 47 }, { 6, 7, 8, 13, 12, 31, 55, 35, 51 }, { 7, 8, 9, 14, 13, 32, 59, 36, 55 }, { 8, 9, 10, 15, 14, 33, 63, 37, 59 }, { 9, 11, 12, 17, 16, 34, 52, 38, 48 }, { 10, 12, 13, 18, 17, 35, 56, 39, 52 }, { 11, 13, 14, 19, 18, 36, 60, 40, 56 }, { 12, 14, 15, 20, 19, 37, 64, 41, 60 }, { 13, 16, 17, 22, 21, 38, 53, 42, 49 }, { 14, 17, 18, 23, 22, 39, 57, 43, 53 }, { 15, 18, 19, 24, 23, 40, 61, 44, 57 }, { 16, 19, 20, 25, 24, 41, 65, 45, 61 }, }; // orismos shmeiwn for (int nNode = 0; nNode < nodeData.GetLength(0); nNode++) { model.NodesDictionary.Add(nNode + 1, new Node(id: nNode + 1, x: nodeData[nNode, 0], y: nodeData[nNode, 1], z: nodeData[nNode, 2])); } // orismos elements Element e1; int subdomainID = 1; double tk_shell_plate = 0.5; for (int nElement = 0; nElement < elementData.GetLength(0); nElement++) { e1 = new Element() { ID = nElement + 1, ElementType = new Shell8NonLinear(material1, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 2)) //ElementType = new Shell8dispCopyGet(material2, 3, 3, 3) { //oVn_i= new double[][] { new double [] {ElementID, ElementID }, new double [] { ElementID, ElementID } }, oVn_i = new double[][] { new double[] { 0, 0, 1 }, new double[] { 0, 0, 1 }, new double[] { 0, 0, 1 }, new double[] { 0, 0, 1 }, new double[] { 0, 0, 1 }, new double[] { 0, 0, 1 }, new double[] { 0, 0, 1 }, new double[] { 0, 0, 1 }, }, tk = new double[] { tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate, tk_shell_plate }, } }; for (int j = 0; j < 8; j++) { e1.NodesDictionary.Add(elementData[nElement, j + 1], model.NodesDictionary[elementData[nElement, j + 1]]); } model.ElementsDictionary.Add(e1.ID, e1); model.SubdomainsDictionary[subdomainID].Elements.Add(e1); } // constraint paaktwsh gurw gurw plevres int pointID; int[] cnstrnd = new int[] { 21, 22, 23, 24, 25, 26, 27, 28, 29, 1, 2, 3, 4, 5, 42, 43, 44, 45, 46, 47, 48, 49, 6, 11, 16, 10, 15, 20, 62, 63, 64, 65 }; for (int k = 0; k < cnstrnd.GetLength(0); k++) { pointID = cnstrnd[k]; model.NodesDictionary[pointID].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[pointID].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[pointID].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); model.NodesDictionary[pointID].Constraints.Add(new Constraint { DOF = StructuralDof.RotationX }); model.NodesDictionary[pointID].Constraints.Add(new Constraint { DOF = StructuralDof.RotationY }); } // fortish korufhs Load load1; load1 = new Load() { Node = model.NodesDictionary[13], DOF = StructuralDof.TranslationZ, Amount = 1 * load_value }; model.Loads.Add(load1); }
public static void HostElementsBuilder(Model model) { string workingDirectory = @"E:\GEORGE_DATA\DESKTOP\input files"; //"..\..\..\Resources\Beam3DInputFiles"; string MatrixGeometryFileName = "MATRIX_3D-L_x=10-L_y=10-L_z=100-9x9x100-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=5-L_y=5-L_z=100-50x50x1000-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=5-L_y=5-L_z=100-5x5x100-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=5-L_y=5-L_z=100-25x25x500-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=1-L_y=1-L_z=10-5x5x50-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=30-L_y=30-L_z=100-3x3x10-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=30-L_y=30-L_z=100-29x29x100-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=10-L_y=10-L_z=100-19x19x200-Geometry_MSolve.inp"; //"MATRIX_3D-L_x=10-L_y=10-L_z=100-9x9x100-Geometry_MSolve.inp"; string MatrixGonnectivityFileName = "MATRIX_3D-L_x=10-L_y=10-L_z=100-9x9x100-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=5-L_y=5-L_z=100-50x50x1000-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=5-L_y=5-L_z=100-5x5x100-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=5-L_y=5-L_z=100-25x25x500-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=1-L_y=1-L_z=10-5x5x50-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=30-L_y=30-L_z=100-3x3x10-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=30-L_y=30-L_z=100-29x29x100-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=10-L_y=10-L_z=100-19x19x200-ConnMatr_MSolve.inp"; //"MATRIX_3D-L_x=10-L_y=10-L_z=100-9x9x100-ConnMatr_MSolve.inp"; int matrixNodes = File.ReadLines(workingDirectory + '\\' + MatrixGeometryFileName).Count(); int matrixElements = File.ReadLines(workingDirectory + '\\' + MatrixGonnectivityFileName).Count(); // Nodes Geometry using (TextReader reader = File.OpenText(workingDirectory + '\\' + MatrixGeometryFileName)) { for (int i = 0; i < matrixNodes; i++) { string text = reader.ReadLine(); string[] bits = text.Split(','); int nodeID = int.Parse(bits[0]); double nodeX = double.Parse(bits[1]); double nodeY = double.Parse(bits[2]); double nodeZ = double.Parse(bits[3]); model.NodesDictionary.Add(nodeID, new Node(id: nodeID, x: nodeX, y: nodeY, z: nodeZ)); } } // Create Material var solidMaterial = new ElasticMaterial3D() { YoungModulus = 1.00, PoissonRatio = 0.30, }; // Generate elements using (TextReader reader = File.OpenText(workingDirectory + '\\' + MatrixGonnectivityFileName)) { for (int i = 0; i < matrixElements; i++) { string text = reader.ReadLine(); string[] bits = text.Split(','); int elementID = int.Parse(bits[0]); int node1 = int.Parse(bits[1]); int node2 = int.Parse(bits[2]); int node3 = int.Parse(bits[3]); int node4 = int.Parse(bits[4]); int node5 = int.Parse(bits[5]); int node6 = int.Parse(bits[6]); int node7 = int.Parse(bits[7]); int node8 = int.Parse(bits[8]); // Hexa8NL element definition var hexa8NLelement = new Element() { ID = elementID, ElementType = new Hexa8NonLinear(solidMaterial, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) }; // Add nodes to the created element hexa8NLelement.AddNode(model.NodesDictionary[node1]); hexa8NLelement.AddNode(model.NodesDictionary[node2]); hexa8NLelement.AddNode(model.NodesDictionary[node3]); hexa8NLelement.AddNode(model.NodesDictionary[node4]); hexa8NLelement.AddNode(model.NodesDictionary[node5]); hexa8NLelement.AddNode(model.NodesDictionary[node6]); hexa8NLelement.AddNode(model.NodesDictionary[node7]); hexa8NLelement.AddNode(model.NodesDictionary[node8]); // Add Hexa element to the element and subdomains dictionary of the model model.ElementsDictionary.Add(hexa8NLelement.ID, hexa8NLelement); //model.SubdomainsDictionary[0].ElementsDictionary.Add(hexa8NLelement.ID, hexa8NLelement); model.SubdomainsDictionary[0].Elements.Add(hexa8NLelement); } } }
public static void HostElementsBuilder(Model model) { // Nodes Geometry model.NodesDictionary.Add(1, new Node(id: 1, x: 10.00, y: 2.50, z: 2.50)); model.NodesDictionary.Add(2, new Node(id: 2, x: 0.00, y: 2.50, z: 2.50)); model.NodesDictionary.Add(3, new Node(id: 3, x: 0.00, y: -2.50, z: 2.50)); model.NodesDictionary.Add(4, new Node(id: 4, x: 10.00, y: -2.50, z: 2.50)); model.NodesDictionary.Add(5, new Node(id: 5, x: 10.00, y: 2.50, z: -2.50)); model.NodesDictionary.Add(6, new Node(id: 6, x: 0.00, y: 2.50, z: -2.50)); model.NodesDictionary.Add(7, new Node(id: 7, x: 0.00, y: -2.50, z: -2.50)); model.NodesDictionary.Add(8, new Node(id: 8, x: 10.00, y: -2.50, z: -2.50)); // Boundary Conditions model.NodesDictionary[2].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[2].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[2].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); model.NodesDictionary[3].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[3].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[3].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); model.NodesDictionary[6].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[6].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[6].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); model.NodesDictionary[7].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[7].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[7].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); // Create Material var solidMaterial = new ElasticMaterial3D() { YoungModulus = 3.76, PoissonRatio = 0.3779, }; // Hexa8NL element definition var hexa8NLelement = new Element() { ID = 1, ElementType = new Hexa8NonLinear(solidMaterial, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) }; // Add nodes to the created element hexa8NLelement.AddNode(model.NodesDictionary[1]); hexa8NLelement.AddNode(model.NodesDictionary[2]); hexa8NLelement.AddNode(model.NodesDictionary[3]); hexa8NLelement.AddNode(model.NodesDictionary[4]); hexa8NLelement.AddNode(model.NodesDictionary[5]); hexa8NLelement.AddNode(model.NodesDictionary[6]); hexa8NLelement.AddNode(model.NodesDictionary[7]); hexa8NLelement.AddNode(model.NodesDictionary[8]); // Add Hexa element to the element and subdomains dictionary of the model model.ElementsDictionary.Add(hexa8NLelement.ID, hexa8NLelement); model.SubdomainsDictionary[1].Elements.Add(hexa8NLelement); // Add nodal load values at the top nodes of the model model.Loads.Add(new Load() { Amount = 25, Node = model.NodesDictionary[1], DOF = StructuralDof.TranslationZ }); model.Loads.Add(new Load() { Amount = 25, Node = model.NodesDictionary[4], DOF = StructuralDof.TranslationZ }); model.Loads.Add(new Load() { Amount = 25, Node = model.NodesDictionary[5], DOF = StructuralDof.TranslationZ }); model.Loads.Add(new Load() { Amount = 25, Node = model.NodesDictionary[8], DOF = StructuralDof.TranslationZ }); }
public static bool HexaCantileverBuilderDispControl(Model model, double load_value) { var material1 = new ElasticMaterial3D() { YoungModulus = 1353000, PoissonRatio = 0.3, }; double[,] nodeData = new double[, ] { { -0.250000, -0.250000, -1.000000 }, { 0.250000, -0.250000, -1.000000 }, { -0.250000, 0.250000, -1.000000 }, { 0.250000, 0.250000, -1.000000 }, { -0.250000, -0.250000, -0.500000 }, { 0.250000, -0.250000, -0.500000 }, { -0.250000, 0.250000, -0.500000 }, { 0.250000, 0.250000, -0.500000 }, { -0.250000, -0.250000, 0.000000 }, { 0.250000, -0.250000, 0.000000 }, { -0.250000, 0.250000, 0.000000 }, { 0.250000, 0.250000, 0.000000 }, { -0.250000, -0.250000, 0.500000 }, { 0.250000, -0.250000, 0.500000 }, { -0.250000, 0.250000, 0.500000 }, { 0.250000, 0.250000, 0.500000 }, { -0.250000, -0.250000, 1.000000 }, { 0.250000, -0.250000, 1.000000 }, { -0.250000, 0.250000, 1.000000 }, { 0.250000, 0.250000, 1.000000 } }; int[,] elementData = new int[, ] { { 1, 8, 7, 5, 6, 4, 3, 1, 2 }, { 2, 12, 11, 9, 10, 8, 7, 5, 6 }, { 3, 16, 15, 13, 14, 12, 11, 9, 10 }, { 4, 20, 19, 17, 18, 16, 15, 13, 14 }, }; // orismos shmeiwn for (int nNode = 0; nNode < nodeData.GetLength(0); nNode++) { model.NodesDictionary.Add(nNode + 1, new Node(id: nNode + 1, x: nodeData[nNode, 0], y: nodeData[nNode, 1], z: nodeData[nNode, 2])); } // orismos elements Element e1; int subdomainID = 1; for (int nElement = 0; nElement < elementData.GetLength(0); nElement++) { e1 = new Element() { ID = nElement + 1, ElementType = new Hexa8NonLinear(material1, GaussLegendre3D.GetQuadratureWithOrder(3, 3, 3)) // dixws to e. exoume sfalma enw sto beambuilding oxi//edw kaleitai me ena orisma to Hexa8 }; for (int j = 0; j < 8; j++) { e1.NodesDictionary.Add(elementData[nElement, j + 1], model.NodesDictionary[elementData[nElement, j + 1]]); } model.ElementsDictionary.Add(e1.ID, e1); model.SubdomainsDictionary[subdomainID].Elements.Add(e1); } // constraint vashh opou z=-1 for (int k = 1; k < 5; k++) { model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationY }); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationZ }); } // thetoume constraint tous prescribed //Load load1; for (int k = 17; k < 21; k++) { //load1 = new Load() //{ // Node = model.NodesDictionary[k], // DOF = DOFType.X, // Amount = 1 * load_value //}; //model.Loads.Add(load1); model.NodesDictionary[k].Constraints.Add(new Constraint { DOF = StructuralDof.TranslationX }); } return(true); }
private ExtrapolationGaussLegendre2x2x2() : base(GaussLegendre3D.GetQuadratureWithOrder(2, 2, 2)) { }