@@ -869,3 +869,82 @@ def contact_solve(mapdl):
869
869
mapdl .allsel ()
870
870
mapdl .set ("last" )
871
871
mapdl .mute = False
872
+
873
+
874
+ @pytest .fixture (scope = "function" )
875
+ def cuadratic_beam_problem (mapdl ):
876
+ mapdl .clear ()
877
+
878
+ # Enter verification example mode and the pre-processing routine.
879
+ mapdl .prep7 ()
880
+
881
+ # Type of analysis: static.
882
+ mapdl .antype ("STATIC" )
883
+
884
+ # Element type: BEAM188.
885
+ mapdl .et (1 , "BEAM188" )
886
+
887
+ # Special Features are defined by keyoptions of beam element:
888
+
889
+ # KEYOPT(3)
890
+ # Shape functions along the length:
891
+ # Cubic
892
+ mapdl .keyopt (1 , 3 , 3 ) # Cubic shape function
893
+
894
+ # KEYOPT(9)
895
+ # Output control for values extrapolated to the element
896
+ # and section nodes:
897
+ # Same as KEYOPT(9) = 1 plus stresses and strains at all section nodes
898
+ mapdl .keyopt (1 , 9 , 3 , mute = True )
899
+
900
+ mapdl .mp ("EX" , 1 , 30e6 )
901
+ mapdl .mp ("PRXY" , 1 , 0.3 )
902
+ print (mapdl .mplist ())
903
+
904
+ w_f = 1.048394965
905
+ w_w = 0.6856481
906
+ sec_num = 1
907
+ mapdl .sectype (sec_num , "BEAM" , "I" , "ISection" )
908
+ mapdl .secdata (15 , 15 , 28 + (2 * w_f ), w_f , w_f , w_w )
909
+
910
+ # Define nodes
911
+ for node_num in range (1 , 6 ):
912
+ mapdl .n (node_num , (node_num - 1 ) * 120 , 0 , 0 )
913
+
914
+ # Define one node for the orientation of the beam cross-section.
915
+ orient_node = mapdl .n (6 , 60 , 1 )
916
+
917
+ # Print the list of the created nodes.
918
+ print (mapdl .nlist ())
919
+
920
+ for elem_num in range (1 , 5 ):
921
+ mapdl .e (elem_num , elem_num + 1 , orient_node )
922
+
923
+ # Print the list of the created elements.
924
+ print (mapdl .elist ())
925
+
926
+ # Display elements with their nodes numbers.
927
+ mapdl .eplot (show_node_numbering = True , line_width = 5 , cpos = "xy" , font_size = 40 )
928
+
929
+ # BC for the beams seats
930
+ mapdl .d (2 , "UX" , lab2 = "UY" )
931
+ mapdl .d (4 , "UY" )
932
+
933
+ # BC for all nodes of the beam
934
+ mapdl .nsel ("S" , "LOC" , "Y" , 0 )
935
+ mapdl .d ("ALL" , "UZ" )
936
+ mapdl .d ("ALL" , "ROTX" )
937
+ mapdl .d ("ALL" , "ROTY" )
938
+ mapdl .nsel ("ALL" )
939
+
940
+ # Parametrization of the distributed load.
941
+ w = 10000 / 12
942
+
943
+ # Application of the surface load to the beam element.
944
+ mapdl .sfbeam (1 , 1 , "PRES" , w )
945
+ mapdl .sfbeam (4 , 1 , "PRES" , w )
946
+ mapdl .finish ()
947
+
948
+ mapdl .run ("/SOLU" )
949
+ mapdl .solve ()
950
+ mapdl .finish ()
0 commit comments