Fluids

Fluids

Topics related to Fluent, CFX, Turbogrid and more.

“Reusing” Fluent Simulation Settings

    • RyMor
      Subscriber

      Hello, 


      I am wondering if there is a "best approach" to "re-using" simulation settings between altered simulation runs.


      In a very general example, say I run a given simulation that uses an inlet velocity of 0.01 m/s (along with other required parameters). 


      After this simulation and resulting post-processing are complete, I would like to run the same simulation but now with an inlet velocity of 0.02 m/s. (SKIP TO "MAIN QUESTION" below for the gist of this post)


      SPECIFIC BACKGROUND:


      I have been running into errors (unfortunately, I do not have the correct error codes. From my memory, the error is something like mpt: 99999) upon initialization when I try to perform simulations like in the above example.


      These errors force close Fluent and the only way I have found to consistently prevent them is by resetting the "Setup", "Solution", and "Results" workflow tabs in Workbench before fully reapplying my settings again from scratch in "Setup". As you can infer, for wanting to just change the inlet velocity, this process is extremely cumbersome and time consuming. 


      Recently, I have been relying on Journals to try and fast track this process but I have found their reliance on GUI commands to make them  somewhat unreliable. I have also tried saving my settings through the TUI command line but I run into issues with this approach because I rename boundaries within my simulation and I think that prevents my settings from fully being applied (i.e. only generic boundary name are present at the start up setup, so perhaps the use of custom boundary names "confuses" Fluent when reading these saved settings files?)  


      (I use the LTNE porous media model which represents the porous media by creating a solid domain coincident to a fluid domain, thus producing new boundaries. I then rename boundaries to distinguish between those that are fluid and solid adjacent) 


      MAIN QUESTION:


      All this is to say that I am looking for a simple, reliable, and consistent why to reuse simulation settings without getting initialization errors. I feel that there must be an approach method that I am missing as I am sure changing things like inlet conditions from simulations to simulation is something that readily happens in both research and industry. 


      Any enlightenment on this topic would be appreciated!


      Thanks, 


      Ryan

    • Kalyan Goparaju
      Ansys Employee

      Hello Ryan, 


      After finishing one simulation, go back to the inlet boundary condition, change the appropriate number, re-initialize the solution and calculate it. This will ensure that only the inlet velocity value is edited and nothing else. Is this what you are looking for or have I misunderstood the question? 


      Thanks,


      kalyan

    • Rob
      Forum Moderator

      If you just want to change the inlet velocity, do so and run the model (no need to initialise) from the existing data. I'd advise doing this outside of Workbench though as it'll confuse the workflow set-up. Don't forget to save each case & data with a sensible filename. 

    • RyMor
      Subscriber

      Hi Kaylan, 


      I do believe this might work, but I forgot to mention that I am specifically referring to after I complete one simulation run, then save, and then return back to the simulation later with new adjustments. (i.e. such as changing the inlet condition among others)


      Just to be clear, I am not wondering about how to make sure only the inlet condition is changed but rather, how I can return to a simulation later (after having saved my initial run) and then change some simulation parameters without getting initialization errors when I re-run the simulation with the new settings.


      Thanks, 


      Ryan

    • RyMor
      Subscriber

      Hi rwoolhou,


      How does one run the model outside of Workbench? Also, what are you referring to when you say "existing data", as I think the presence  of "existing data" from the previous simulation maybe be related to my initialization errors.


      My thought is that I would not want to use "existing data" for simulations with altered settings because I want to generate new results. I am not too sure if this is the right train of thought, so if you could elaborate that would be helpful.


      Also, in terms of not need initializing, my simulations uses a UDF with the DEFINE_INIT function to set up an initial temperature distribution within the domain upon simulation initialization. So I feel that this might conflict with that suggestion. 


      Essentially just looking for best practice to: Setup Simulation Settings > Solve > Post-Process > Save > Close > Return to Simulation > Configure Settings (i.e. inlet velocity among other things) > Run simulation again without getting errors upon initialization > Post-Process > Save > Close ... *Repeat*


      Thanks,


      Ryan

    • Kalyan Goparaju
      Ansys Employee

      Hello Ryan, 


      In the workbench, once a simulation complete, the 'Setup' and the 'Solution' cell should have a green check mark next to them. At that stage, I recommend duplicating the analysis system. In the duplicate system, you can edit the Setup cell (which will have the exact same settings are the original simulation) as required, initialize and run the simulation. once this new simulation is done, you will have to different analysis systems in Workbench, 1) The original 2) the duplicate with altered conditions. You can always go back to either one of the simulations. Please let me know if this helps.


      Thanks,


      Kalyan

    • RyMor
      Subscriber

      Hi Kaylan, 


      Thank you for the suggestion. However, there are two question I have about this approach:


      1) By "duplicate" do you mean simply making a copy of the initial simulation through use of "Save As"? If so, I have been avoiding this approach due to the increased storage usage that would result from having duplicates of the initial simulation.


      2) With that said, I do not see how this would be different from the method I mentioned initially which was giving me initialization errors? I feel that even when duplicating the simulation, error will still persist as I would still be changing the simulation settings of a simulation which has already been initialized and solved. Or are you suggesting that "duplicating" before post-processing would avoid initialization errors in the newly duplicated simulation?


      Thanks, 


      Ryan

    • Kalyan Goparaju
      Ansys Employee

      Hello Ryan, 


      1. In Workbench, if you click on the little arrow on the top left of the analysis system, you will get an option to duplicate it. What that does is to create a second identical copy of this system. Yes, there will be a slight increase in the disk space requirement but this process will ensure that you always have the original option to fall back onto


      2. As I mentioned above, if you duplicate the simulation, the settings are identical to the original. If you now change the inlet BC and run the simulation (without initializing), you should not face any issue (putting aside the chance of divergence due to problem setup, if any). However, if you have to start the simulation from scratch with the new Inlet BC i.e. initialize and then run, and you are seeing an initialization issue, then something else is wrong and it not probably the settings. Have you tried different types of initializations? Standard, Hybrid, FMG? 


      Thanks,


      Kalyan

    • Rob
      Forum Moderator

      To run Fluent outside of Workbench you need to find the launcher exe and run it. For some reason Student lacks a launcher option in the list of software, 


      C:Program FilesANSYS Incv201fluentntbinwin64fluent.exe 


      on my PC. Open the case & data, make the change and iterate. This uses the previous solution as your initial guess rather than the initialisation guess you used in the first model. 


      To get the case and data out of Workbench Fluent use the File>Export>Case& data and put them somewhere sensible and rename them! 

    • RyMor
      Subscriber

      Hi Kaylan, 


      In regard to your point 2):


      Just to clarify, the issue does not occur when starting completely "from scratch". This issue occurs after a complete simulation run through, when all workflow tabs have green check marks.


      It occurs when I go back into the "Solution" tab, change the settings I need to change, then reinitialize the simulation (as i mentioned above i need to initialize because I use of an DEFINE_INIT function to apply an initial temperature distribution within the domain). 


      Once the "Initialize" button is clicked, an error code is produced (and repeated) within the console, and then Fluent is forced closed.


      Hopefully this clarifies my issue.


       


      Thanks, 


      Ryan

    • RyMor
      Subscriber

      Hi rwoolhou, 


      So just to make sure I understand your suggestion. The basis of it is to access the case & data from the "original" simulation within a "stand alone" Fluent environment, change the settings I would like to change, run the simulation, and then rename and relocate the new case & data files?


      If this understanding is correct, I have a follow up question:


      When the "stand alone" simulation uses the original simulation's solution as its "initial guess", does this mean that the "stand alone" simulation will still begin from the original initial conditions? Or will the simulation start from where the original simulation ended? Apologies if this wording is not clear. 


      Thanks, 


      Ryan

    • Rob
      Forum Moderator

      Think how Fluent works. It's an iterative solver, so we initialise the solution to give us the first "guess" and then iterate to an accurate solution. 


      If I run a model at 1m/s and solve it I save the case and data. To run at 2m/s I change the boundary with the old data already loaded and press iterate. Rather than using a guess (initialised data) I use the flow data for the slower flow. This tends to accelerate convergence as the flow field is probably about the same but may be at a higher velocity. 

Viewing 11 reply threads
  • The topic ‘“Reusing” Fluent Simulation Settings’ is closed to new replies.