The ICoFluentUnit interface provides a set of
functions that perform typical commands in ANSYS Fluent for solving a CFD simulation
case. For example you can load or save case and data files, set the number of
computational iterations, initiate a calculation, get or set defined parameter
values, and so on. An example of a simple client that uses the interface is given in
A Fluent Client Example.
ICoFluentUnit
getComponentName();returns the name of the connected component
setComponentName(in string
p_szName);sets the name of the component to
p_szName
getComponentDescription();returns the description of the connected component
setComponentDescription(in string
p_szDescription);sets the description of the connected component to
p_szDescription
calculate();iterates the solution for the number of iterations
specified with setNrIterations. This is
mainly for use with steady simulations as it does not
perform dual-time iteration. For transient cases you can
issue the solve/dual-time-iterate TUI command using
doMenuCommand (see ICoFluentSchemeController)
setNrIterations(in long
p_INrIterations);sets the number of iterations that
calculate will perform to
p_INrIterations.
getNrIterations();returns the number of iterations currently set for a
calculate command to perform
loadCase(in string
p_szCaseFileName);load the case file p_szCaseFileName
from the Fluent working directory into Fluent
loadData(in string
p_szDataFileName);load the data file p_szDataFileName
from the Fluent working directory into Fluent
saveCase(in string
p_szCaseFileName);save the current Fluent case to
p_szCaseFileName in the Fluent
working directory
saveData(in string
p_szDataFileName);save the current Fluent data to
p_szDataFileName in the Fluent
working directory
getNrInputParameters();returns the number of input parameters defined in the current case
getInputParameterNameByIndex(in
long lInputParameterIndex);returns a string containing the name of the input
parameter with index
lInputParameterIndex
setInputParameterValueByIndex(in
long p_lInputParameterIndex, in float
p_lfInputParameterValue);sets the value of the input parameter with index
p_lInputParameterIndex to
p_lfInputParameterValue
setInputParameterValueByName(in
string p_lInputParameterName, in float
p_lfInputParameterValue);sets the value of the input parameter with name
p_lInputParameterName to
p_lfInputParameterValue
getNrOutputParameters();returns the number of output parameters defined in the current case
getOutputParameterNameByIndex(in
long lOutputParameterIndex);returns a string containing the name of the output
parameter with index
IOutputParameterIndex
getOutputParameterValueByIndex(in
long p_lOutputParameterIndex);returns the value of the output parameter with index
IOutputParameterIndex
getOutputParameterValueByName(in
string p_lOutputParameterName);returns the value of the output parameter with name
p_IOutputParameterName
terminate();terminate the connected Fluent as a Server session
getSchemeControllerInstance();returns an object that can be used to send TUI or scheme commands to the Fluent session and perform more advanced functions using the ICoFluentSchemeController Interface (see ICoFluentSchemeController)