AD implementation for custom topology optimization variables (gammaDV → Helmholtz filter → projection → alpha) #1008
Ananth-Narayan-IITM
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
I am implementing density-based topology optimization in DAFoam and I am having difficulty understanding how a new chain of variables should be incorporated into the AD framework.
The filter equation is
fvScalarMatrix gammaFilterEqn ( -fvm::laplacian(pow(radius,2), gammaFilter) + fvm::Sp(oneGammaFilter, gammaFilter) == gammaDV ); gammaFilterEqn.solve();followed by the projection and Brinkman interpolation to compute
alpha.I inspected DASimpleFoam, observed that CoDiPack is typically used as
However, I am not sure whether my filter/projection chain should be implemented using this approach.
I am unsure what is the correct architecture for introducing a new design-variable chain into DAFoam. Should I tape the entire chain, I am very unclear on how to proceed
Ultimately I need derivatives such as
d(Objective)/d(gammaDV)andd(VolumeConstraint)/d(gammaDV), where the objective or constraint depends directly ongammaoralpha.Could someone point me to the recommended way of implementing this within DAFoam's AD framework?
Any guidance or relevant examples would be greatly appreciated.
Thank you
All reactions