As an example implementation, the cost functions (section 2.1) and the dynamically generated boundary conditions (section 2.2) were applied in a CFD optimization routine. First, a simple 2D geometry was parametrized in terms of five design variables: a, b, c, d, e. Using a Python-script (36) the geometry was generated depending on these design parameters. BlockMesh (OpenFOAM (35)) was used to mesh the geometry. The Eulerian-Eulerian solver twoPhaseEulerFoam (OpenFOAM) was used to simulate the drug release through the device for high and low flow-rate boundary conditions. Transient boundary conditions were applied using the OpenFOAM library swak4Foam (37). A Python-script (36) determined the drug-release profiles as a function of the scaled inhaled volume x for each boundary condition and then calculated the cost functions CA and CB.
A total cost function Ctot = wACA + wBCB was calculated (where wA and wB are weightings). The cost function Ctot was minimized by systematically changing the geometry using a steepest gradient-descent method, see e.g. (38).
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.
Tips for asking effective questions
+ Description
Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.