public ThermalRod(IReadOnlyList <Node> nodes, double crossSectionArea, ThermalMaterial material)
 {
     Debug.Assert(nodes.Count == 2, "Thermal rod element must have exactly 2 nodes.");
     this.material         = material;
     this.Nodes            = nodes;
     this.CrossSectionArea = crossSectionArea;
     this.Length           = nodes[0].CalculateEuclidianDistanceFrom(nodes[1]);
 }
 public ThermalPixel(
     ThermalPixel thermalPixel,
     Temperature temperature)
 {
     ThermalMaterial       = thermalPixel.ThermalMaterial;
     Temperature           = temperature;
     Reference             = thermalPixel.Reference;
     MovableThermalObjects = null;
 }
 public ThermalPixel(
     ThermalMaterial thermalMaterial,
     Temperature temperature,
     IThermalObject reference = null)
 {
     ThermalMaterial       = thermalMaterial;
     Temperature           = temperature;
     Reference             = reference;
     MovableThermalObjects = null;
 }
Example #4
0
        public Hexa8ThermoHyperElastic(IContinuumMaterial3DDefGrad hyperElasticMaterial, ThermalMaterial thermalMaterial,
                                       IQuadrature3D quadratureForStiffness, IQuadrature3D quadratureForMass, IGaussPointExtrapolation3D gaussPointExtrapolation)
        {
            this.thermalMaterial             = thermalMaterial;
            this.nGaussPoints                = quadratureForStiffness.IntegrationPoints.Count;
            this.QuadratureForConsistentMass = quadratureForMass;
            this.QuadratureForStiffness      = quadratureForStiffness;
            this.Interpolation               = InterpolationHexa8Reverse.UniqueInstance;

            materialsAtGaussPoints = new IContinuumMaterial3DDefGrad[nGaussPoints];
            for (int i = 0; i < nGaussPoints; i++)
            {
                materialsAtGaussPoints[i] = (IContinuumMaterial3DDefGrad)hyperElasticMaterial.Clone();
            }
        }
Example #5
0
        public ThermalElement3D(IReadOnlyList <Node> nodes, IIsoparametricInterpolation3D interpolation,
                                IQuadrature3D quadratureForStiffness, IQuadrature3D quadratureForMass,
                                IGaussPointExtrapolation3D gaussPointExtrapolation, ThermalMaterial material)
        {
            this.material = material;
            this.GaussPointExtrapolation = gaussPointExtrapolation;
            this.Nodes         = nodes;
            this.Interpolation = interpolation;
            this.QuadratureForConsistentMass = quadratureForMass;
            this.QuadratureForStiffness      = quadratureForStiffness;

            dofTypes = new IDofType[nodes.Count][];
            for (int i = 0; i < interpolation.NumFunctions; ++i)
            {
                dofTypes[i] = new IDofType[] { ThermalDof.Temperature }
            }
            ;
        }
        private static void AddEmbeddedElements(Model model)
        {
            // Material
            double density          = 1.0;
            double c                = 1.0;
            double h                = 1.0;
            double crossSectionArea = 0.1;
            var    embeddedMaterial = new ThermalMaterial(density, c, conductivityFiber, h);

            // Nodes
            int numNonEmbeddedNodes = model.NodesDictionary.Count;
            int embeddedNode1       = numNonEmbeddedNodes + 1; // We do not know if the non embedded node IDs start from 0 or 1. This way there are no duplicate IDs, but there may be a gap.
            int embeddedNode2       = numNonEmbeddedNodes + 2;

            model.NodesDictionary.Add(embeddedNode1, new Node(id: embeddedNode1, x: minX, y:  minY + 0.25));
            model.NodesDictionary.Add(embeddedNode2, new Node(id: embeddedNode2, x: maxX, y:  minY + 0.25));

            // Elements
            Node[] startEndNodes          = { model.NodesDictionary[embeddedNode1], model.NodesDictionary[embeddedNode2] };
            var    elementType            = new ThermalRod(startEndNodes, crossSectionArea, embeddedMaterial);
            int    numNonEmbeddedElements = model.ElementsDictionary.Count();
            int    embeddedElementID      = hostElementsIDStart + numNonEmbeddedElements;
            var    elementWrapper         = new Element()
            {
                ID = embeddedElementID, ElementType = elementType
            };

            foreach (var node in startEndNodes)
            {
                elementWrapper.AddNode(node);
            }
            model.ElementsDictionary[elementWrapper.ID] = elementWrapper;
            model.SubdomainsDictionary[subdomainID].Elements.Add(elementWrapper);

            // Apply embedding
            var embeddedGrouping = new ThermalEmbeddedGrouping(model,
                                                               model.ElementsDictionary.Where(x => x.Key < numNonEmbeddedElements).Select(kv => kv.Value),
                                                               model.ElementsDictionary.Where(x => x.Key >= numNonEmbeddedElements).Select(kv => kv.Value),
                                                               new ThermalElementTransformationVector());

            embeddedGrouping.ApplyEmbedding();
        }
Example #7
0
 public ThermalElement2DFactory(double commonThickness, ThermalMaterial commonMaterial)
 {
     this.commonThickness = commonThickness;
     this.commonMaterial  = commonMaterial;
 }
Example #8
0
 public ThermalElement3DFactory(ThermalMaterial commonMaterial)
 {
     this.commonMaterial = commonMaterial;
 }