Ejemplo n.º 1
0
        public double[,] GetPointMatrixH(Jacobian jacobian, double conductivity)
        {
            double[] dndx = jacobian.GetdNdx();
            double[] dndy = jacobian.GetdNdy();
            double   det  = jacobian.GetDetJ();

            double[,] tmpdndx = MatrixOperations.multiply(dndx, MatrixOperations.transpose(dndx), det);
            double[,] tmpdndy = MatrixOperations.multiply(dndy, MatrixOperations.transpose(dndy), det);
            return(MatrixOperations.multiply(MatrixOperations.addition(tmpdndx, tmpdndy), new double[] { conductivity }));
        }
Ejemplo n.º 2
0
        public double[,] GetSurfaceMatrixH(int surfaceID, double alfa)
        {
            IntPoint pkt1 = new IntPoint(-1 / Math.Sqrt(3));
            IntPoint pkt2 = new IntPoint(1 / Math.Sqrt(3));

            double[,] pcMatrix1 = pkt1.GetPcMatrix(alfa);
            double[,] pcMatrix2 = pkt2.GetPcMatrix(alfa);
            double det = this.GetSurfaceLength(surfaceID) / 2;

            return(MatrixOperations.multiply(MatrixOperations.addition(pcMatrix1, pcMatrix2), new double[] { det }));
        }
Ejemplo n.º 3
0
        public double[] GetSurfaceVectorP(int surfaceID, double alfa, double ambientTemperature)
        {
            IntPoint pkt1 = new IntPoint(-1 / Math.Sqrt(3));
            IntPoint pkt2 = new IntPoint(1 / Math.Sqrt(3));

            double[] n1  = pkt1.GetNVector();
            double[] n2  = pkt2.GetNVector();
            double   det = this.GetSurfaceLength(surfaceID) / 2;

            return(MatrixOperations.multiply(MatrixOperations.addition(n1, n2), new double[] { alfa, ambientTemperature, det }));
        }
Ejemplo n.º 4
0
 private void simulateButton_Click_1(object sender, EventArgs e)
 {
     results.Text = "";
     double[,] resultH;
     double[] resultP;
     for (int time = 0; time < globalData.GetSymTime(); time += (int)globalData.GetStepTime())
     {
         double[] t0 = grid.GetTemperatures();
         resultP = MatrixOperations.addition(p, MatrixOperations.multiply(c, t0, 1 / globalData.GetStepTime()));
         resultH = MatrixOperations.addition(h, MatrixOperations.multiply(c, new double[] { 1 / globalData.GetStepTime() }));
         t0      = MatrixOperations.gaussianElimination(resultH, resultP);
         grid.SetTemperatures(t0);
         results.Text += "Time[s]: " + (time + globalData.GetStepTime()) + "\t\tMinTemperature [°C]: " + min(t0) + "\t\tMaxTemperature [°C]: " + max(t0) + "\n";
         Console.WriteLine("Time[s]: " + (time + globalData.GetStepTime()) + "\t\tMinTemperature [°C]: " + min(t0) + "\t\tMaxTemperature [°C]: " + max(t0) + "\n");
     }
 }
Ejemplo n.º 5
0
 public double[,] GetPointMatrixC(UniversalElement universalElement, double det, double specificHeat, double density)
 {
     double[] shapeFunctions = universalElement.GetShapeFun();
     return(MatrixOperations.multiply(shapeFunctions, MatrixOperations.transpose(shapeFunctions), det * specificHeat * density));
 }
Ejemplo n.º 6
0
 public double[,] GetPcMatrix(double alfa)
 {
     double[] n = GetNVector();
     return(MatrixOperations.multiply(n, MatrixOperations.transpose(n), alfa));
 }