Optimizing the Design of a Fuel Pod with NX and Maple - Maple Help

Home : Support : Online Help : Applications and Example Worksheets : Science and Engineering : Optimizing the Design of a Fuel Pod with NX and Maple

Optimizing the Design of a Fuel Pod with NX and Maple

Introduction

A manufacturer has designed a fuel pod in NX.  The fuel pod has hemispherical and conical caps, and a cylindrical midsection.

To minimize material costs, the manufacturer wants to minimize the surface area of the fuel pod while maintaining the existing volume

This application

 • pulls the current dimensions of the fuel pod (radius of the hemispherical end, length of the cylindrical midsection, and height of the conical end) from the NX CAD model
 • calculates the current volume of the fuel pod
 • optimizes the dimensions to minimize the surface area while maintaining the existing volume
 • and pushes the optimized dimensions back into the NX CAD model

To use this application, you must

 • have a supported version of NX installed,
 • ensure the NX-Maple link is working correctly (see NX for details).
 • load canisterOptimization.prt in NX (this is the CAD model of the fuel pod),

 > $\mathrm{restart}:$$\mathrm{with}\left(\mathrm{Optimization}\right):$$\mathrm{with}\left(\mathrm{CAD}:-\mathrm{NX}\right):$

Read Existing Design Parameters in Maple

 > $\mathrm{pars}:=\mathrm{GetParameterNames}\left(\right)$
 > $\mathrm{heightConeCurr}≔\mathrm{GetParameterValue}\left("heightCone"\right)\cdot \mathrm{GetParameterUnits}\left("heightCone"\right)$
 ${\mathrm{heightConeCurr}}{:=}{50.00}{}⟦{\mathrm{mm}}⟧$ (2.1)
 > $\mathrm{lenCentralCurr}≔\mathrm{GetParameterValue}\left("lenCentral"\right)\cdot \mathrm{GetParameterUnits}\left("lenCentral"\right)$
 ${\mathrm{lenCentralCurr}}{:=}{60.00}{}⟦{\mathrm{mm}}⟧$ (2.2)
 > $\mathrm{radSphereCurr}≔\mathrm{GetParameterValue}\left("radSphere"\right)\cdot \mathrm{GetParameterUnits}\left("radSphere"\right)$
 ${\mathrm{radSphereCurr}}{:=}{15.00}{}⟦{\mathrm{mm}}⟧$ (2.3)

Define Expressions to Calculate the Volume and Surface Area of the Canister

 >
 > $\mathrm{vol}≔\mathrm{volCanister}\left(\mathrm{heightConeCurr},\mathrm{lenCentralCurr},\mathrm{radSphereCurr}\right)$
 ${\mathrm{vol}}{:=}{61261.05675}{}{⟦{\mathrm{mm}}⟧}^{{3}}$ (3.1)
 > $\mathrm{surfaceCanister}≔\left(\mathrm{heightCone},\mathrm{lenCentral},\mathrm{radSphere}\right)→\mathrm{evalf}\left(2\mathrm{π}{\mathrm{radSphere}}^{2}+2\mathrm{π}\mathrm{radSphere}\mathrm{lenCentral}+\mathrm{π}\mathrm{radSphere}\sqrt{{\mathrm{radSphere}}^{2}+{\mathrm{heightCone}}^{2}}\right):$
 > $\mathrm{surfaceCanister}\left(\mathrm{heightConeCurr},\mathrm{lenCentralCurr},\mathrm{radSphereCurr}\right)$
 ${9528.522740}{}{⟦{\mathrm{mm}}⟧}^{{2}}$ (3.2)

Design Optimization

Minimize the surface area while maintaining the volume

 > $\mathrm{optValues}≔\mathrm{Minimize}\left(\mathrm{surfaceCanister}\left(\mathrm{heightConeNew},\mathrm{lenCentralNew},\mathrm{radSphereNew}\right),\left\{\mathrm{volCanister}\left(\mathrm{heightConeNew},\mathrm{lenCentralNew},\mathrm{radSphereNew}\right)=\frac{\mathrm{vol}}{{⟦\mathrm{mm}⟧}^{3}}\right\},\mathrm{assume}=\mathrm{nonnegative}\right)$
 ${\mathrm{optValues}}{:=}\left[{7660.22}{,}\left[{\mathrm{heightConeNew}}{=}{21.46}{,}{\mathrm{lenCentralNew}}{=}{10.73}{,}{\mathrm{radSphereNew}}{=}{23.99}\right]\right]$ (4.1)

Export New Design Parameters into NX

 > $\mathrm{assign}\left({\mathrm{optValues}}_{2}\right):$
 > $\mathrm{SetParameterValue}\left("heightCone",\mathrm{heightConeNew}\right):$
 > $\mathrm{SetParameterValue}\left("lenCentral",\mathrm{lenCentralNew}\right):$
 > $\mathrm{SetParameterValue}\left("radSphere",\mathrm{radSphereNew}\right):$
 >