Exemple #1
0
        #Global Arguments
        global_args = {
            'frame3dd_filename': "test",
            'length_scaling': 1,
            "using_Frame3dd": False,
            "debug_plot": False,
            "gravity": [0, 0, 0]
        }

        if global_args["using_Frame3dd"]:
            frame3dd.write_frame3dd_file(out_nodes, global_args, out_frames,
                                         constraints, loads)
            subprocess.call("frame3dd {0}.csv {0}.out".format(
                global_args["frame3dd_filename"]),
                            shell=True)
            res_nodes, res_reactions = frame3dd.read_frame3dd_results(
                global_args["frame3dd_filename"])
            res_displace = frame3dd.read_frame3dd_displacements(
                global_args["frame3dd_filename"])
        else:
            res_displace, C, Q = pfea.solver.analyze_System(
                out_nodes, global_args, out_frames, constraints, loads)
            #cProfile.run('res_displace,C,Q = pfea.analyze_System(out_nodes, global_args, out_frames, constraints,loads)')
            #def_displace = pfea.analyze_System(out_nodes, global_args, def_frames, constraints,loads)

        tot_force = 0
        for constraint in constraints:
            if constraint["value"] != 0:
                tot_force = tot_force + C[int(constraint["node"] * 6 +
                                              constraint["DOF"])]
        #print(len(frames)*frame_props["d1"]*frame_props["d2"]*frame_props["Le"]/(subdiv*vox_pitch)**3)
Exemple #2
0
										 'cross_section'  : frame_props["cross_section"],
										 'roll': frame_props["roll"],
										 'loads':{'element':0},
										 'prestresses':{'element':0},
										 'Le': frame_props["Le"]})]

		#Format node positions
		out_nodes = np.array(nodes)

		#Global Arguments 
		global_args = {'frame3dd_filename': "test", 'length_scaling':1,"using_Frame3dd":False,"debug_plot":False, "gravity" : [0,0,0]}

		if global_args["using_Frame3dd"]:
			frame3dd.write_frame3dd_file(out_nodes, global_args, out_frames, constraints,loads)
			subprocess.call("frame3dd {0}.csv {0}.out".format(global_args["frame3dd_filename"]), shell=True)
			res_nodes, res_reactions = frame3dd.read_frame3dd_results(global_args["frame3dd_filename"])
			res_displace = frame3dd.read_frame3dd_displacements(global_args["frame3dd_filename"])
		else:
			res_displace,C,Q = pfea.solver.analyze_System(out_nodes, global_args, out_frames, constraints,loads)
			#cProfile.run('res_displace,C,Q = pfea.analyze_System(out_nodes, global_args, out_frames, constraints,loads)')
			#def_displace = pfea.analyze_System(out_nodes, global_args, def_frames, constraints,loads)

		tot_force = 0
		for constraint in constraints:
			if constraint["value"] != 0:
				tot_force = tot_force + C[int(constraint["node"]*6+constraint["DOF"])]
		#print(len(frames)*frame_props["d1"]*frame_props["d2"]*frame_props["Le"]/(subdiv*vox_pitch)**3)
		
		zheightvals.append([zheight,tot_force/(subdiv*vox_pitch)**2/(strain)])
		print(zheight,tot_force/(subdiv*vox_pitch)**2/(strain))
	vals.append([subdiv,zheightvals])
        'frame3dd_filename': "test",
        'length_scaling': 1,
        "using_Frame3dd": False,
        "debug_plot": False,
        "gravity": [0, 0, 0]
    }

    #global_args["node_radius"] = np.zeros(len(nodes))+0.05*frame_props["Le"]

    if global_args["using_Frame3dd"]:
        frame3dd.write_frame3dd_file(out_nodes, global_args, out_frames,
                                     constraints, loads)
        subprocess.call("frame3dd {0}.csv {0}.out".format(
            global_args["frame3dd_filename"]),
                        shell=True)
        res_nodes, C = frame3dd.read_frame3dd_results(
            global_args["frame3dd_filename"])
        res_displace = frame3dd.read_frame3dd_displacements(
            global_args["frame3dd_filename"])
    else:
        if notskipping:
            res_displace, C, Q = pfea.analyze_System(out_nodes, global_args,
                                                     out_frames, constraints,
                                                     loads)
        #cProfile.run('res_displace,C,Q = pfea.analyze_System(out_nodes, global_args, out_frames, constraints,loads)')
        #def_displace = pfea.analyze_System(out_nodes, global_args, def_frames, constraints,loads)
        #else:
        #print("skipping")

    tot_force = 0
    tot_disp = 0
    num_forced = 0
									 'beam_divisions': 1,
									 'shear':True})]


	#Format node positions
	out_nodes = np.array(nodes)

	#Global Arguments
	global_args = {'frame3dd_filename': "test",'length_scaling':1,"using_Frame3dd":False,"debug_plot":False,"gravity" : [0,0,0]}

	#global_args["node_radius"] = np.zeros(len(nodes))+0.05*frame_props["Le"]

	if global_args["using_Frame3dd"]:
		frame3dd.write_frame3dd_file(out_nodes, global_args, out_frames, constraints,loads)
		subprocess.call("frame3dd {0}.csv {0}.out".format(global_args["frame3dd_filename"]), shell=True)
		res_nodes, C = frame3dd.read_frame3dd_results(global_args["frame3dd_filename"])
		res_displace = frame3dd.read_frame3dd_displacements(global_args["frame3dd_filename"])
	else:
		if notskipping:
			res_displace,C,Q = pfea.analyze_System(out_nodes, global_args, out_frames, constraints,loads)
		#cProfile.run('res_displace,C,Q = pfea.analyze_System(out_nodes, global_args, out_frames, constraints,loads)')
		#def_displace = pfea.analyze_System(out_nodes, global_args, def_frames, constraints,loads)
		#else:
			#print("skipping")

	tot_force = 0
	tot_disp = 0
	num_forced = 0

	xdim = np.max(nodes.T[0])-np.min(nodes.T[0])
	ydim = np.max(nodes.T[1])-np.min(nodes.T[1])