How can I set up a repeating cycle of timesteps? For instance, I have a 0.03 second cycle where the timestep needs to get larger as the cycle progresses, but I want to go back to the original timestep at the start of the next cycle.
Tagged: 2019 R3, cfx, fluid-dynamics, General, General - CFX
March 17, 2023 at 8:57 amFAQParticipant
In CFX Expression language, the procedure is as shown below, but the logic would apply in any code. LIBRARY: CEL: &replace EXPRESSIONS: customtime = if(cycleno>1,Time-0.03[s]*(cycleno-1),Time) cycleno = int(Time/0.03 [s])+1 dt = if(cycletime <= 0.01[s] ,0.001[s], 0 [s])+ if(cycletime>0.01[s] && cycletime <= 0.02[s], 0.002[s], 0[s]) + if(cycletime >0.02[s] && cycletime<= 0.03[s], 0.003[s], 0.0[s]) END END END Since we have a repeating cycle of 0.03 [s], we need something to let us know what cycle we are in, so that we can make a custom time counter that will reset at the beginning of each cycle. This makes use of the int() function, which rounds UP to the closest integer. cycleno = int(Time/0.03 [s])+1 Next we can make a time counter that goes from 0-0.03 [s][ repeatedly. This makes use of the conditional if() function: cycletime = if(cycleno>1,Time-0.03[s]*(cycleno-1),Time) Now, we create a series of additive if() statements to cover each portion of the cycle. each one is only active inside its cycletime range dt = if(cycletime <= 0.01[s] ,0.001[s], 0 [s])+ if(cycletime>0.01[s] && cycletime <= 0.02[s], 0.002[s], 0[s]) + if(cycletime >0.02[s] && cycletime<= 0.03[s], 0.003[s], 0.0[s]) If the list is very long, create a separate if expression for each portion and then add these expressions for a tidier timestep expression that is easier to debug.
Introducing Ansys Electronics Desktop on Ansys Cloud
The Watch & Learn video article provides an overview of cloud computing from Electronics Desktop and details the product licenses and subscriptions to ANSYS Cloud Service that are...
How to Create a Reflector for a Center High-Mounted Stop Lamp (CHMSL)
This video article demonstrates how to create a reflector for a center high-mounted stop lamp. Optical Part design in Ansys SPEOS enables the design and validation of multiple...
Introducing the GEKO Turbulence Model in Ansys Fluent
The GEKO (GEneralized K-Omega) turbulence model offers a flexible, robust, general-purpose approach to RANS turbulence modeling. Introducing 2 videos: Part 1 provides background information on the model and a...
Postprocessing on Ansys EnSight
This video demonstrates exporting data from Fluent in EnSight Case Gold format, and it reviews the basic postprocessing capabilities of EnSight.
- ANSYS Fluent: Introduction to the GEKO Turbulence Model Part I
- ANSYS System Coupling: Two Way Fluid Structure Interaction – Part 1
- Delete or Deactivate Zone in Fluent
- ANSYS Polyflow: Adaptive Meshing Based on Contact
- Apply Custom Material Properties in Fluent
- How can I create a Cell Register from a Cell Zone?
- What is meant by Warning: Flow boundary zone 18 is adjacent to a solid zone?
- Check CPU Time in ANSYS FLUENT
- Aero-Mechanical Simulation of Turbomachinery Blading
- Running Python Script from Workbench
© 2023 Copyright ANSYS, Inc. All rights reserved.