Escolar Documentos
Profissional Documentos
Cultura Documentos
This tutorial demonstrates the ability to record, modify and playback script files and show how a single,
consistent, and well-documented journaling and scripting capability is useful for automating all phases
of a simulation. It is designed to introduce you to the ANSYS AIM user interface using a simple geometry.
In this tutorial you will learn how to
Launch ANSYS AIM.
Record a session in a script file.
Import the geometry.
Create computational mesh.
Set up the CFD simulation which includes setting the material properties and boundary conditions.
Calculating a solution.
Playback the script file from the interactive session for end-to-end simulation.
Examining the results.
Modification of script file, including customization with advanced operations that are available in the
scripting language (such as conditional logic)
Ability to access and modify the fluids setup and results data via commands and scripts.
8.1. Prerequisites
This tutorial assumes that you have little to no experience with ANSYS AIM and so each step will be
explicitly described.
8.3.1. Preparation
1.
2.
From the Windows Start menu, select Start > All Programs > > ANSYS 16.0 > ANSYS AIM 16.0 to start
a new ANSYS AIM session.
This displays the ANSYS AIM application window. The various Simulation Process Templates are
displayed in the Study panel at the left. The right is the help window where you can go through
the various videos to learn ANSYS AIM and also has links to the Help menu. The Workflow tab is
displayed at the bottom.
2.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
Home(
Note
If the unit system is not in the list, click on Unit Systems.... In the Unit Systems dialog
box, ensure that the unit system you are interested in is de-selected in column D or the
Suppressed column.
3.
From the menu select File > Scripting > Record Journal
a.
In the Save As window browse to your working folder and enter an appropriate name,
CFD_auto_script.
b.
Click Save.
The journal file now records the session.
8.3.3. Geometry
In the Study panel click on Import Geometry in the group Additional Creation Methods under Simulation Process Templates.
Click Choose File... and select the file TrumpetValve.agdb from your working folder and click
Open.
8.3.4. Mesh
1.
Now you need to mesh the geometry. You can do this by either:
Clicking on Geometry cell > Add Next > Meshing in the Workflow tab.
Clicking on Add > Meshing in the Geometry panel under Connected Tasks.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
RMB in the graphics window and clicking on Add Next Task > Meshing.
2.
In the Mesh panel select Fluid flow from the Engineering intent drop-down list.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
3.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
b.
c.
d.
Note
The recording journal captures the properties only when they are changed. The default
values are not captured in the recorded journal. So it is recommended to change the
values of the properties like changing inflation here for instance.
4.
In the Workflow tab right-click on Mesh and select Update from the menu.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
8.3.5. Physics
Add a Physics task. You can do this by either:
Clicking on Mesh cell > Add Next > Physics Solution in the Workflow tab.
Clicking on Add >Physics Solution in the Mesh panel under Connected Tasks.
RMB in the graphics window and selecting Add Next Task > Physics Solution.
1.
b.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
c.
2.
3.
Click Apply.
Click on New using from the drop-down list and select Water (Material Samples) from the list.
b.
In the Water Assignment panel select Fluid Flow Physics Region from the Location drop-down
list.
Return to the Physics panel and click Add next to Boundary Conditions and select Inlet from the dropdown list.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
4.
a.
In the Inlet panel select inlet from the Location drop-down list.
b.
Return to the Physics panel and click Add next to Boundary Conditions and select Outlet from the
drop-down list.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
5.
Select outlet from the Location drop-down list and enter 0 Pa or Gauge static pressure.
Return to the Physics panel and click Add next to Boundary Conditions and select Wall from the dropdown list.
The program automatically updates the Location You will see that the panel is already marked
Up-to-date.
6.
Return to the Physics panel. Under Solver Options click on Numerical Controls.
a.
10
In the Numerical Controls panel click on >to expand Solution Control. Under Coupling Control
select SIMPLE from Pressure velocity coupling drop-down list.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
7.
b.
Under Explicit relaxation enter 0.4 as the Explicit relax factor for pressure.
c.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
11
8.
The Physics task is now ready to be updated. You can update it by either clicking blue lightning bolt next
to the Out-of-date message near the top of the Physics panel, the blue lightning bolt next to the Output
tab near the bottom of the Physics panel, by selecting Update under the Workflow tab, or by RMB
within the graphics window and selecting Solve Physics from the context menu.
9.
You can click on the Transcript and the Solution Quality tabs to check the progress.
Note
You have changed the default numerical values so that they can be recorded in the journal.
8.3.6. Results
You can add Results by either:
Clicking on Physics cell > Add Next > Results Evaluation In the Workflow tab.
Clicking on Add > Results Evaluation in the Physics panel under Connected Tasks.
Or, RMB in the graphics window and selecting Add Next Task > Results Evaluation
1.
12
In the Results panel click Add and select Contour from the drop-down menu.
a.
In the Contour panel select the wall from Location drop-down list.
b.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
d.
Now click Next Step > Add > Results > Vector
i.
ii.
iii.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
13
Now you will create planes to display the velocity vectors and pressure contours.
2.
Click Next Step > Add > Construction Geometry > Plane
a.
14
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
b.
Click Next Step > Add > Construction Geometry > Plane to add another plane.
i.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
15
ii.
c.
16
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
d.
e.
i.
ii.
iii.
ii.
iii.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
17
i.
ii.
3.
In the Workflow tab right-click on Results and select Update from the menu.
4.
18
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
In your working folder you will find a journal file CFD_auto_script. Open it in any text editor. You will
see in the scripts the steps that were followed in the tutorial. You can change the settings in the journal
file and then run the script with the modifications to see the results.
Note
A journal file (CFD_Automation) is given with the geometry file. This file looks similar
to the one you have created. It has added comments to show the process of the simulation. You can change the settings in the file and run the script to check the results.
8.3.7. Summary
With ANSYS AIM you can record, playback and modify a journal file. You learned how to:
1. Record a journal file,
2. Set-up a fluid analysis in AIM by defining tasks directly,
3. Import CAD geometry,
4. Create a mesh,
5. Assign materials from existing libraries,
6. Apply boundary conditions,
7. Solve the analysis,
8. Post-process results, and
9. Playback a simulation using a recorded journal file.
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.
19
20
Release 16.0 - SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information
of ANSYS, Inc. and its subsidiaries and affiliates.