Skip to content

2 d fluid optimization #4

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

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

2 d fluid optimization #4

wants to merge 26 commits into from

Conversation

mattkeller304
Copy link
Collaborator

Initial Commit of Optimization - 2D Building in Steady State Navier Stokes Flow

Includes

  1. unitTest_2D_building
  • .dat file outlining the 2D building model in steady state (10.0m/s) navier stokes flow. “computeNullH” and “computeNullV” function handles applied to domain boundaries and “meshMotionBody” handle applied to building structure.
  1. main_MCSteadyStateIncompressibleNavierStokesFlow_Mean_Perturb
  • Optimization algorithm based on Brendan’s mean value significance perturbation python script.
  • Parameters are perturbed by a harcoded value. The influence on the parameter of interest (drag in this case) is quantified using significance measures.
  • Input parameters are updated using gradient and significance calculations.
  • No random sampling of a distribution is applied, rather a set value is used to change the model and its’ impact upon the drag is observed before updating.
  • Currently set to run with only a single parameter (building height).
  • Parameter 2 is unperturbed (delta p2 = 0) with related calculations commented out.

- To Do: Reconcile parser error of concatenating varying function handle lengths for ALE nodes (computeNullH, computNullV, meshMotionBody), ensure significance measure values are correct for 2D building geometry perturbations.

  1. main_monteCarloSteadyStateIncompressibleNavierStokesFlow_Opt
  • Optimization loop based on Monte Carlo tree search algorithms.
  • Utilizes Monte Carlo random sampling across user defined distributions for each input parameter to locate the best case (lowest drag) random sample point for both parameter 1 and 2 variables.
  • The best case of the three scenarios (Only p1, Only p2, p1+p2) is identified and the search region is restricted by redefining the standard deviation and mean value around the best case points.
  • Parameter 1 and 2 values are updated accordingly.
  • Process is then looped to continuously converge upon a best case solution.

- To Do: Test the convergence once 2D building geometry applied, expand the process to include distributions other than uniform, integrate mesh motion process.

@andreas-apostolatos
Copy link
Owner

Initial Commit of Optimization - 2D Building in Steady State Navier Stokes Flow

Includes

  1. unitTest_2D_building
  • .dat file outlining the 2D building model in steady state (10.0m/s) navier stokes flow. “computeNullH” and “computeNullV” function handles applied to domain boundaries and “meshMotionBody” handle applied to building structure.
  1. main_MCSteadyStateIncompressibleNavierStokesFlow_Mean_Perturb
  • Optimization algorithm based on Brendan’s mean value significance perturbation python script.
  • Parameters are perturbed by a harcoded value. The influence on the parameter of interest (drag in this case) is quantified using significance measures.
  • Input parameters are updated using gradient and significance calculations.
  • No random sampling of a distribution is applied, rather a set value is used to change the model and its’ impact upon the drag is observed before updating.
  • Currently set to run with only a single parameter (building height).
  • Parameter 2 is unperturbed (delta p2 = 0) with related calculations commented out.

- To Do: Reconcile parser error of concatenating varying function handle lengths for ALE nodes (computeNullH, computNullV, meshMotionBody), ensure significance measure values are correct for 2D building geometry perturbations.

  1. main_monteCarloSteadyStateIncompressibleNavierStokesFlow_Opt
  • Optimization loop based on Monte Carlo tree search algorithms.
  • Utilizes Monte Carlo random sampling across user defined distributions for each input parameter to locate the best case (lowest drag) random sample point for both parameter 1 and 2 variables.
  • The best case of the three scenarios (Only p1, Only p2, p1+p2) is identified and the search region is restricted by redefining the standard deviation and mean value around the best case points.
  • Parameter 1 and 2 values are updated accordingly.
  • Process is then looped to continuously converge upon a best case solution.

- To Do: Test the convergence once 2D building geometry applied, expand the process to include distributions other than uniform, integrate mesh motion process.

Hey Matt,

thanks a lot for the developments. I will have a look now at the added code and make some modifications accordingly.

Regarding the names of the function handles at the ALE nodes, unfortunately those have to have the same name otherwise they can not be arranged to an array. We could think of somehow improving that, but at the moment we can stick with the constraint that all function handles need to have the same string length.

Greetings,
Andreas

@andreas-apostolatos
Copy link
Owner

Hello Matt,

I am getting a singular solution when running your new optimization script, there is somewhere a problem with the definition of the boundary conditions for the fluid, can you please figure it out what's wrong?

I added the mesh motion solution step after the update of you design parameters. I modified the name of your function handle to match the string length of the other function handles. That new function handle returns a zero mesh motion (dummy case). I tested it and it runs fine. I believe now we have everything we need to go ahead with the optimization.

Thanks for the support.

Best Regards,
Andreas

ge73zup and others added 23 commits January 13, 2020 14:01
…ded simplified model for sensitivity check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants