-
-
June 27, 2023 at 5:03 pm
Dr Fatima Razavi, PhD in MEC ENG
SubscriberDear Community Members,
I hope this message finds you in good health and high spirits.I have attached a script file, which functions appropriately as a *.cse file when executed through "play a session" in CFX-post. However, I require assistance in making it iterative so that it can load 120 timesteps and export each timestep as a separate CSV file. Despite my attempts to achieve this by installing Padre and familiarizing myself with Perl scripting, I have been unable to find a satisfactory solution.Therefore, I kindly request your support in making this script iterative. The attached file functions correctly, but as soon as I introduce a loop, it fails to execute properly.In light of these challenges, I believe attending a workshop on scripting/automation in CFD would greatly benefit me. While I am proficient in Unix Bash Scripting, I recognize the need to expand my knowledge in this area.Thank you for your attention to this matter. I sincerely appreciate your assistance.Warm regards,Fatemeh.
---------------------------------------------------------------------------------
---------------------------------------------------------------------------------# Session file started: 2023/06/20 11:37:39# CFX-21.2# To avoid unnecessary file pre-processing and modifications, include# COMMAND FILE at the top of your session file.# If it is not included, the file is assumed to be older and will be# modified for backward compatibility.COMMAND FILE:CFX Post Version = 21.2ENDPLANE:Plane 1Apply Instancing Transform = OnApply Texture = OffBlend Texture = OnBound Radius = 0.5 [m]Colour = 0.75, 0.75, 0.75Colour Map = Default Colour MapColour Mode = VariableColour Scale = LogarithmicColour Variable = Ragweed.Averaged Volume FractionColour Variable Boundary Values = ConservativeCulling Mode = No CullingDirection 1 Bound = 1.0 [m]Direction 1 Orientation = 0 [degree]Direction 1 Points = 10Direction 2 Bound = 1.0 [m]Direction 2 Points = 10Domain List = /DOMAIN GROUP:All DomainsDraw Contours = OffDraw Faces = OnDraw Lines = OffInstancing Transform = /DEFAULT INSTANCE TRANSFORM:Default TransformInvert Plane Bound = OffLighting = OnLine Colour = 0, 0, 0Line Colour Mode = DefaultLine Width = 1Max = 0.0Min = 0.0Normal = 1 , 0 , 0Number of Contours = 11Option = XY PlanePlane Bound = NonePlane Type = SlicePoint = 0 [m], 0 [m], 0 [m]Point 1 = 0 [m], 0 [m], 0 [m]Point 2 = 1 [m], 0 [m], 0 [m]Point 3 = 0 [m], 1 [m], 0 [m]Range = GlobalRender Edge Angle = 0 [degree]Specular Lighting = OnSurface Drawing = Smooth ShadingTexture Angle = 0Texture Direction = 0 , 1 , 0Texture File =Texture Material = MetalTexture Position = 0 , 0Texture Scale = 1Texture Type = PredefinedTile Texture = OffTransform Texture = OffTransparency = 0.0X = 0.0 [m]Y = 0.0 [m]Z = 1.6 [m]OBJECT VIEW TRANSFORM:Apply Reflection = OffApply Rotation = OffApply Scale = OffApply Translation = OffPrincipal Axis = ZReflection Plane Option = XY PlaneRotation Angle = 0.0 [degree]Rotation Axis From = 0 [m], 0 [m], 0 [m]Rotation Axis To = 0 [m], 0 [m], 0 [m]Rotation Axis Type = Principal AxisScale Vector = 1 , 1 , 1Translation Vector = 0 [m], 0 [m], 0 [m]X = 0.0 [m]Y = 0.0 [m]Z = 0.0 [m]ENDEND# Sending visibility action from ViewUtilities>show /PLANE:Plane 1, view=/VIEW:View 1##################> load timestep=35388EXPORT:ANSYS Export Data = Element Heat FluxANSYS File Format = ANSYSANSYS Reference Temperature = 0.0 [K]ANSYS Specify Reference Temperature = OffANSYS Supplemental HTC = 0.0 [W m^-2 K^-1]Additional Variable List =BC Profile Type = Inlet VelocityCSV Type = CSVCase Name = Case 2nd3min7msExport Connectivity = OffExport Coord Frame = GlobalExport File = E:/Fatemeh (Live Runs)/BEST CFD Runs/2023-06-05-Transient-\8Diff-4PartInj-FansSQ-0TO180-7ms/2023-06-05-ExhaustsOnWall-8SwirrlDiffON-\4Aerosolizers-FansFwBw7msSynchronized-FansSQ_003/CSV Files/348.csvExport Geometry = OnExport Location Aliases =Export Node Numbers = OffExport Null Data = OnExport Type = GenericExport Units System = CurrentExport Variable Type = CurrentExternal Export Data = NoneInclude File Information = OffInclude Header = OnLocation = CeilingWallLocation List = /PLANE:Plane 1Null Token = nullOverwrite = OnPrecision = 8Separator = ", "Spatial Variables = X,Y,ZVariable List = Ragweed.Averaged Volume FractionVector Brackets = ()Vector Display = ScalarEND>export -
June 29, 2023 at 9:29 am
Rob
Ansys EmployeeWe can't cover scripting in much detail, but...
Check the CFD Post documentation or CFX Reference manual section on power syntax. You can embed perl statements in a .cse file. Any line starting with an ! is interpreted as a perl statement. Italics as a colleague told me - I don't use CFX.
What we have done before is to create a couple of dummy models. Create a report (in CFD Post) for the first model, then read the new case (same geometry but different file name) into CFD Post & update the report. The state file should give you the command syntax, repeat & then modify to suit the real model. For 120 models you may want to borrow a student or write a Python/AWK script to generate the full journal but that depends on how complex the Perl bit is.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- License Error
- Error with workbench SceneGraphChart
- Sizing on Ansys Workbench 19.2
- Workbench not opening
- Error: Exception of type ‘Ansys.Fluent.Cortex.Cortex not availableException’ was thrown
- Workbench error
- how to open DesignModeler
- FlexNet Licensing – Not running
- Problem with FlexNet Licensing
- An error occurred when the post processor attempted to load a specific result.
-
7584
-
4432
-
2949
-
1422
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.