@@ -18,11 +18,7 @@ def InitializeSolutionStep(self):
1818
1919# Define the analytical solution
2020def analytical_temperature (x , y , t ):
21- # return x**2*y
2221 return - np .cos (x )* np .sinh (y )
23- # return x**3+y**3
24- # return x**2+y**2
25- # return x+y
2622
2723# Main simulation function
2824if __name__ == "__main__" :
@@ -61,25 +57,6 @@ def analytical_temperature(x, y, t):
6157 curr_temperature += N [0 , i ] * node .GetSolutionStepValue (KratosMultiphysics .DISPLACEMENT_X , 0 )
6258 computed_temperature .append (curr_temperature )
6359
64-
65- # # Loop over elements to gather computed solution
66- # for cond in mp.Conditions:
67- # geom = cond.GetGeometry()
68- # N = geom.ShapeFunctionsValues()
69- # center = geom.Center()
70- # weight = elem.GetValue(KratosMultiphysics.INTEGRATION_WEIGHT)
71- # weights.append(weight)
72- # # Extract Gauss point (center) coordinates
73- # x_coord.append(center.X)
74- # y_coord.append(center.Y)
75-
76- # # Initialize solution values at the center
77- # curr_temperature = 0
78- # # Compute nodal contributions using shape functions
79- # for i, node in enumerate(geom):
80- # curr_temperature += N[0, i] * node.GetSolutionStepValue(KratosMultiphysics.TEMPERATURE, 0)
81- # computed_temperature.append(curr_temperature)
82-
8360 # Get the current time after simulation run
8461 current_time = simulation ._GetSolver ().GetComputingModelPart ().ProcessInfo [KratosMultiphysics .TIME ]
8562 print ("Current time after simulation:" , current_time )
0 commit comments