Exemplo n.º 1
0
        // Compute thermal vector
        public override void thermalVector()
        {
            for (int i = 0; i < 24; i++)
            {
                evec[i] = 0.0;
            }

            mat = (Material)fem.materials[matName];
            double alpha  = mat.getAlpha();
            double lambda = mat.getLambda();
            double mu     = mat.getMu();
            double g      = 3.0 * lambda + 2.0 * mu;

            for (int ip = 0; ip < gh.nIntPoints; ip++)
            {
                ShapeLin3D.shape(gh.xii[ip], gh.eti[ip], gh.zei[ip], ind, an);
                // Temperature at integration point
                double t = 0;
                for (int i = 0; i < 8; i++)
                {
                    t += an[i] * dtn[i];
                }
                double det = ShapeLin3D.deriv(gh.xii[ip], gh.eti[ip], gh.zei[ip], ind, xy, dnxy);
                double dv  = g * alpha * t * det * gh.wi[ip];
                for (int i = 0; i < 8; i++)
                {
                    for (int j = 0; j < 3; j++)
                    {
                        evec[i * 3 + j] += dnxy[i][j] * dv;
                    }
                }
            }
        }
Exemplo n.º 2
0
        // Returns temperature at integration point (stress)
        public override double getTemperatureAtIntPoint(int ip)
        {
            ShapeLin3D.shape(gs.xii[ip], gs.eti[ip], gs.zei[ip], ind, an);
            double t = 0;

            for (int i = 0; i < 8; i++)
            {
                t += an[i] * dtn[i];
            }
            return(t);
        }