Skip to content

Commit

Permalink
Move assembler creation, write out coordinate frame
Browse files Browse the repository at this point in the history
  • Loading branch information
A-CGray committed Jan 19, 2025
1 parent b25dbe9 commit 8ad8b51
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions examples/mach_tutorial_wing/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@

dtype = TACS.dtype

# Instantiate FEAAssembler
structOptions = {
"printtiming": True,
}

# ==============================================================================
# Composite properties
# ==============================================================================
Expand Down Expand Up @@ -102,10 +97,19 @@
VerticalDirection = np.array([0.0, 0.0, 1.0])

# ==============================================================================
# Element callback function
# Create pyTACS assembler
# ==============================================================================
structOptions = {
"printtiming": True,
"writeCoordinateFrame": True,
}

bdfFile = os.path.join(os.path.dirname(__file__), "wingbox-L2-Order2.bdf")
FEAAssembler = pyTACS(bdfFile, options=structOptions, comm=comm)

# ==============================================================================
# Element callback function
# ==============================================================================
def elemCallBack(dvNum, compID, compDescript, elemDescripts, specialDVs, **kwargs):
prop = constitutive.MaterialProperties(
rho=compositeProperties["rho"],
Expand Down Expand Up @@ -221,16 +225,6 @@ def elemCallBack(dvNum, compID, compDescript, elemDescripts, specialDVs, **kwarg
return elem, DVScales


# ==============================================================================
# Create pyTACS assembler
# ==============================================================================
structOptions = {
"printtiming": True,
}

bdfFile = os.path.join(os.path.dirname(__file__), "wingbox-L2-Order2.bdf")
FEAAssembler = pyTACS(bdfFile, options=structOptions, comm=comm)

# Set up elements and TACS assembler
FEAAssembler.initialize(elemCallBack)

Expand Down

0 comments on commit 8ad8b51

Please sign in to comment.