-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved Slices and Inverse Design #284
Comments
The first thing we should do is add the python class that takes in the raw slice data and sorts it etc. We can assume the raw slice data will be in the same format as the slices in the slice.dat output files. So until I implement the fortran routine that returns the raw slice data, you guys can assume the incoming data will have the same ordering and same variables etc. Also, do we want to set up a quick discussion call with everyone to get this going? Does Tuesday June 6th 9am work for everyone? |
I created a new branch: https://github.com/mdolab/adflow/tree/slice_mods Everyone involved can create a branch in their fork and we can merge changes with PRs to the mdolab/slice_mods branch |
@anilyil timing works for me, hmu with details at umich dot edu |
We will want to have developments happening on Follow these steps to set up a fork with a feature branch that copies
The steps 4-5-6 are not really necessary but it is good practice for someone following along after the fact. This makes sure the development branches on each fork is based on the same development branch in mdolab/adflow. As you develop the code, keep committing your changes to the To merge latest changes from the I will try to keep this development branch up to date with other developments happening in the |
I open a PR for the slice_mods. Includes sorting of the connectivity, detection of upper TE, lower TE, TE and LE. Now, need to detect nodes of upper skin and lower skin |
@bbrelje and @lucaeros, I have added the first python and fortran interface to interact with active slices. The PR is up here: #296 I also merged 2 of the latest commits in main. My changes are in a single commit in the end if you want to take a look at those alone. I have attached an example script in the file as well. I currently return the data as a dictionary but we can just put it in the airfoil class. I suggest the following:
One important caveat here: The fortran slice data contains 3 coordinates, 3 pressure tractions, and 3 viscous tractions. Then it contains the surface output data, cp, mach, p, etc. This is different than what the slice files have, 3 coordinates, 3 relative coordinates, and surface output. @lucaeros, we need to account for this difference in the slice class. I say you can completely ignore the XoC YoC ZoC from the slice file because you get a more accurate chord computation anyways. Plus, now that we have all 6 tractions, we can compute lift, drag, and moment for the airfoil from python, and directly constrain it! |
Description of feature
We want to improve slice processing in ADflow and expose the slice-based computations to the Python layer with derivatives so that we can include functions based on the slice data in optimizations. These features will address the following needs:
Right now, all slice processing is done in Fortran in ADflow. This makes it very difficult to modify the code to include these advanced features. However, the Fortran layer is very useful to actually perform the slicing over the distributed mesh and communicate across processors.
Planned Solution
I want to modify how slices are processed in ADflow by exposing the raw slice data to Python. Then, we can order and format the slice data. We can also provide a derivative seed routine for the slices so that whatever derived functions computed with the slice data can be propagated back across the fortran code. Finally, we can also perform more accurate geometric postprocessing operations in Python such as detecting the leading edge point, LE radius, etc.
I want to implement an adflow slice class in python that contains all of the computations based on the raw slice data that comes from fortran. Using these adflow slice instances, we can also compute more accurate spanwise distributions. Finally, we can create modified tecplot outputs from the python layer that contains the correct twist distributions, and any of the constraints we may have prescribed over the slice itself.
For now, I say we keep the development in the ADflow repo. If the resulting code is general enough, we can move it elsewhere, and only maintain a basic slice API in ADflow.
Roadmap
I will work with @lucaeros and @bbrelje for the implementation efforts. Also tagging @lamkina because he usually has good ideas about how these things should be implemented. I suggest we use a project board in github to keep track of individual tasks: https://github.com/orgs/mdolab/projects/14/views/1 Regarding development, we can either create a feature branch on mdolab/adflow or we can use a branch in my fork.
The text was updated successfully, but these errors were encountered: