7.4. Replay File Example

load_stl check="false" file="C:\Users\auser\geom.stl" format="Unknown" overwrite="true"
path="/project/geometry" tol="1.0E-10" units="cm"
add_clip_plane id="Clip" path="/project/geometry/clip_planes"
set_point csys="Cartesian" parameter="fluid_point" path="/project/mesh_controls/material_point:material_point"
ref="Global Origin" value="0.0 cm,0.0 cm,5.5 cm"
set parameter="size" path="/project/mesh_controls/staticsize:global_mesh_size" units="cm" value="0.2"
load_chemistry dir="C:\Users\auser" file="C:\Program Files\Reaction\forte40151_win64\data\Air_NoReactions_2sp.cks"
path="/project/models/chemistry" prompt="false"
add_wall id="Wall" path="/project/boundaries"
add parameter="location" path="/project/boundaries/wall:wall" selection="solid.1.2"
set parameter="wall_temperature" path="/project/boundaries/wall:wall" units="K" value="300"
set_attribute attribute="selected" parameter="wall_temperature_table" path="/project/boundaries/wall:wall"
value="Temperature"
set_vector csys="Cartesian" parameter="direction" path="/project/boundaries/wall:wall" ref="Global Origin" value="0.0
cm,0.0 cm,1.0 cm"
add_wall id="Piston" path="/project/boundaries"
add parameter="location" path="/project/boundaries/wall:piston" selection="moving_0"
set parameter="wall_temperature" path="/project/boundaries/wall:piston" units="K" value="300"
set_attribute attribute="selected" parameter="wall_temperature_table" path="/project/boundaries/wall:piston"
value="Temperature"
set parameter="wall_motion" path="/project/boundaries/wall:piston" value="true"
set parameter="stroke" path="/project/boundaries/wall:piston" units="cm" value="5"
set parameter="connecting_rod" path="/project/boundaries/wall:piston" units="cm" value="8"
set_vector csys="Cartesian" parameter="direction" path="/project/boundaries/wall:piston" ref="Global Origin" value="0.0
cm,0.0 cm,1.0 cm"
add_gas_mixture id="gas_mixture" path="/project/mixtures"
rename id="gas_mixture" path="/project/mixtures" to="air"
add_row index="0" parameter="ck_gas" path="/project/mixtures/gas_mixture:air" value="o2,0.24"
add_row index="1" parameter="ck_gas" path="/project/mixtures/gas_mixture:air" value="n2,0.76"
set parameter="composition" path="/project/initialization/global_initialization" value="air"
set parameter="initial_temperature" path="/project/initialization/global_initialization" units="K" value="400"
set_attribute attribute="selected" parameter="ic_table_temperature" path="/project/initialization/global_initialization"
value="Temperature"
set parameter="initial_pressure" path="/project/initialization/global_initialization" units="atm" value="1"
set_attribute attribute="selected" parameter="ic_table_pressure" path="/project/initialization/global_initialization"
value="Pressure"
set_attribute attribute="selected" parameter="ic_table_turbulence" path="/project/initialization/global_initialization"
value="TKE~TED"
set parameter="velocity_initialization" path="/project/initialization/global_initialization" value="Velocity Components"
set_velocity csys="Cartesian" parameter="initial_velocity" path="/project/initialization/global_initialization"
value="0.0 cm/sec,0.0 cm/sec,0.0 cm/sec"
set parameter="surf_composition_active" path="/project/initialization/global_initialization" value="false"
set parameter="atdc" path="/project/simulation_controls" units="degrees" value="-5"
set parameter="cafin" path="/project/simulation_controls" units="degrees" value="5"
set parameter="angular_velocity" path="/project/simulation_controls" units="rpm" value="2000"
set_enabled path="/project/output_controls/resolved" value="true"
set_enabled path="/project/output_controls/averaged" value="true"
set_enabled path="/project/output_controls/restart" value="true"
save_as file="C:\Users\auser\test_project.ftsim" path="/project"
prepare_run file="C:\Users\auser\test_project.analysis\test_project.ftsim" mpi_args="8" path="/project/run_simulation"
run="Nominal"
submit_run file="C:\Users\auser\test_project.analysis\test_project.ftsim" mpi_args="8" path="/project/run_simulation"
run="Nominal"

Table 7.1: Scripting contexts and command descriptions

Context

Command

Description

/project

 

 

print_help

print_help verbose={Boolean}

Prints help for all available commands.

print

print

Print project contents to the console in XML format.

save

save

Save the project.

save_as

save_as file={String}

Save the project with a different file name.

close_project

close_project

Close the project.

load_project

load_project file={String}

Open a project.

load_replay

load_replay file={String}

Load a replay file.

exit

exit

Exit the application.

set

set parameter={String} value={String} units={String}

Set the value of a project element.

set attribute

set attribute attribute ={String} value={String} parameter={String}

Set the attribute value of a project element.

set_point

set_point parameter={String} value={String[]} csys={String} ref={String}

Set the value, coordinate system, and reference frame of a point element.

set_vector

set_vector parameter={String} value={String[]} csys={String} ref={String}

Set the value, coordinate system, and reference frame of a vector element.

set_velocity

set_velocity parameter={String} value={String[]} csys={String} ref={String}

Set the value, coordinate system, and reference frame of a velocity element.

cd

cd value={String}

Go to the specified project path.

ls

ls filter={String}

List contents of the current project path.

list _commands

list_commands

List available commands within the current project path.

add

add parameter={String} selection={String[]}

Add an item to the list identified by the specified parameter.

remove

remove parameter={String} selection={String[]}

Remove an item from the list identified by the specified parameter.

add_row

add_row=parameter={String} value={String[]} index={Integer}

Add a row to the table identified by the specified parameter.

remove_row

remove_row=parameter={String} index={Integer} count={Integer}

Remove a row(s) from the table identified by the specified parameter.

import_csv

import_csv parameter={String} file={String} skip={Integer} delim={String} has_header={Boolean}

Import table data from a CSV file.

export_csv

export_csv parameter={String} file={String}

Export table data to a CSV file.

swap_rows

swap_rows parameter={String} row1={Integer} row2={Integer}

Swap two rows of a table.

clear

clear parameter={String}

Clear data from the target element.

import_table

import_table file={String} type={String} id={String}

Import lookup table data.

set_color

set_color value={String}

Set the display color of an element.

set_enabled

set_enabled value={Boolean}

Set the enabled state of an element.

set_visible

set_visible value={Boolean}

Set the visibility of a display element.

/project/geometry

 

 

load_stl

load_stl file={String} format={String} overwrite={Boolean} path={String} tol={Double} units={String}

Import geometry into the project from an STL file.

load_ftsim

load_ftsim file={String} units={String} overwrite={Boolean} isAMG={Boolean}

Import geometry into the project from an Ansys Forte Project file.

load_fmsh

load_fmsh file={String} units={String} overwrite={Boolean} isAMG={Boolean}

Import geometry into the project from a Kiva3v file.

load_cgns

load_cgns file={String} units={String} overwrite={Boolean}

Import geometry into the project from a CGNS file.

load_fluent

load_fluent file={String} units={String} overwrite={Boolean}

Import geometry into the project from a Fluent mesh file.

load_xml

load_xml file={String} units={String} overwrite={Boolean}

Import geometry into the project from an XML file.

export_geometry

export_geometry file={String} selection={String[]}

Export project geometry to an STL file.

merge

merge selection={String[]} id={String} tol={Double}

Merge two or more surfaces into a single surface entity.

join

join selection={String[]} tol={Double}

Find shared edges and vertices between two or more surfaces.

split_by_feature

split_by_feature selection={String[]} angle={String} minFaces={Integer}

Split surfaces by feature angle.

split_by_plane

split_by_plane selection={String[]} p={String[]} n={String[]} minFaces={Integer} pref={String} nref={String}

Split geometry by plane.

split_by_point

split_by_point selection={String[]} r={String[]} minFaces={Integer} ref={String}

Split geometry by proximity to point.

transform

transform selection={String[]} scale={String[]} translate={String[]} rotate={String[]} ref={String} copies={Integer} option={String}

Transform surfaces by scale, rotation, and/or translation.

invert_normals

invert_normals selection={String[]}

Reverse the normal orientation of selected surfaces.

measure

measure p1={String[]} p2={String[]} p3={String[]} ref1={String} ref2={String} ref3={String}

Measure geometry.

/project/models/chemistry

 

 

load_chemistry

load_chemistry file={String} dir={String} prompt={Boolean}

Import an Ansys Chemkin chemistry set into the project.

create_composition

load_chemistry id={String} composition_type={String} fuel_mass={Double} fuel_mass_units={String} gas_liq={String} fuel1={String} gasfuel1={String} secondfuel={Boolean} fuel_mass2={Double} fuel_mass2_units={String} gas_liq2={String} gasfuel2={String} fuel2={String} uniqueair={Boolean} air={String} fuelratio={String} air_mass={Double} air_mass_units={String} air_mass_ratio={Double} phi={Double} egr_rate={Double} internal_egr_choice={String} internal_egr_rate={Double} compression_ratio={Double} temp_ratio={Double} pres_ratio={Double} 

Create a mixture using Forte’s Composition Calculator, equivalent to the menu command Utility > Open Composition Calculation > Create Mixture.

/project/ preview_simulation/ preview_mesh_generation/ preview_plot

 

 

preview_mesh

preview_mesh

Run the mesher to generate a preview mesh.

/project/prun_simulation

 

 

submit_run

submit_run file={String} run={String} mpi_args={String}

Submit a run to the solver.

/project/bc_tables

 

 

import_bc_table

import_bc_table file={String} id={String}

Import a boundary condition table from a file.

/project/ic_tables

 

 

import_ic_table

import_ic_table file={String} id={String}

Import an initial condition table from a file.