def wait(self):
        """Denna metod ser till att fönstren hålls uppdaterade och kommer att returnera
        När sista fönstret stängs"""

        cfv.showAndWait()
Example #2
0
                        ed[i,:])
        
        vonMises.append( np.math.sqrt( pow(es[0],2) - es[0]*es[1] + pow(es[1],2) + 3*pow(es[2],2) ) )
        
# ---- Visualise results ----------------------------------------------------

print("Drawing results...")

cfv.figure() 
cfv.drawGeometry(g, title="Geometry")

cfv.figure() 
cfv.drawMesh(coords=coords, edof=edof, dofsPerNode=dofsPerNode, elType=elType, 
             filled=True, title="Mesh") #Draws the mesh.

cfv.figure()
cfv.drawDisplacements(a, coords, edof, dofsPerNode, elType, 
                      doDrawUndisplacedMesh=False, title="Displacements", 
                      magnfac=25.0)

cfv.figure()
cfv.drawElementValues(vonMises, coords, edof, dofsPerNode, elType, a, 
                      doDrawMesh=True, doDrawUndisplacedMesh=False, 
                      title="Effective Stress", magnfac=25.0)
                      
cfv.colorBar().SetLabel("Effective stress")

print("Done drawing...")

cfv.showAndWait()
Example #3
0
             edof=edof,
             dofsPerNode=mesh.dofsPerNode,
             elType=mesh.elType,
             filled=True,
             title="Example 01")

# ----- Draw results

cfv.figure()
cfv.drawElementValues(vonMises,
                      coords,
                      edof,
                      mesh.dofsPerNode,
                      mesh.elType,
                      a,
                      doDrawMesh=True,
                      doDrawUndisplacedMesh=False,
                      title="Example 06 effective stress")

cfv.figure()
cfv.drawDisplacements(a,
                      coords,
                      edof,
                      mesh.dofsPerNode,
                      mesh.elType,
                      doDrawUndisplacedMesh=True,
                      title="Example 06",
                      magnfac=10.0)

cfv.showAndWait()
Example #4
0
 def wait(self):
     # ------ Ensures that the windows are kept updated and will return when the last window is closed
     cfv.showAndWait()