Skip to content
Snippets Groups Projects
ansys-cfx.md 2.94 KiB
Newer Older
  • Learn to ignore specific revisions
  • Lukáš Krupčík's avatar
    Lukáš Krupčík committed
    ANSYS CFX 
    =========
    
    [ANSYS
    CFX](http://www.ansys.com/Products/Simulation+Technology/Fluid+Dynamics/Fluid+Dynamics+Products/ANSYS+CFX)
    software is a high-performance, general purpose fluid dynamics program
    that has been applied to solve wide-ranging fluid flow problems for over
    20 years. At the heart of ANSYS CFX is its advanced solver technology,
    the key to achieving reliable and accurate solutions quickly and
    robustly. The modern, highly parallelized solver is the foundation for
    an abundant choice of physical models to capture virtually any type of
    phenomena related to fluid flow. The solver and its many physical models
    are wrapped in a modern, intuitive, and flexible GUI and user
    environment, with extensive capabilities for customization and
    automation using session files, scripting and a powerful expression
    language.
    
    To run ANSYS CFX in batch mode you can utilize/modify the default
    cfx.pbs script and execute it via the qsub command.
    
    `
    #!/bin/bash
    #PBS -l nodes=2:ppn=16
    #PBS -q qprod
    #PBS -N $USER-CFX-Project
    #PBS -A XX-YY-ZZ
    
    #! Mail to user when job terminate or abort
    #PBS -m ae
    
    #!change the working directory (default is home directory)
    #cd <working directory> (working directory must exists)
    WORK_DIR="/scratch/$USER/work"
    cd $WORK_DIR
    
    echo Running on host `hostname`
    echo Time is `date`
    echo Directory is `pwd`
    echo This jobs runs on the following processors:
    echo `cat $PBS_NODEFILE`
    
    module load ansys
    
    #### Set number of processors per host listing
    #### (set to 1 as $PBS_NODEFILE lists each node twice if :ppn=2)
    procs_per_host=1
    #### Create host list
    hl=""
    for host in `cat $PBS_NODEFILE`
    do
     if [ "$hl" = "" ]
     then hl="$host:$procs_per_host"
     else hl="${hl}:$host:$procs_per_host"
     fi
    done
    
    echo Machines: $hl
    
    #-dev input.def includes the input of CFX analysis in DEF format
    #-P the name of prefered license feature (aa_r=ANSYS Academic Research, ane3fl=Multiphysics(commercial))
    /ansys_inc/v145/CFX/bin/cfx5solve -def input.def -size 4 -size-ni 4x -part-large -start-method "Platform MPI Distributed Parallel" -par-dist $hl -P aa_r
    `
    
    Header of the pbs file (above) is common and description can be find
    on [this
    site](../../resource-allocation-and-job-execution/job-submission-and-execution.html).
    SVS FEM recommends to utilize sources by keywords: nodes, ppn. These
    keywords allows to address directly the number of nodes (computers) and
    cores (ppn) which will be utilized in the job. Also the rest of code
    assumes such structure of allocated resources.
    
    Working directory has to be created before sending pbs job into the
    queue. Input file should be in working directory or full path to input
    file has to be specified. >Input file has to be defined by common
    CFX def file which is attached to the cfx solver via parameter
    -def
    
    License** should be selected by parameter -P (Big letter **P**).
    Licensed products are the following: aa_r
    (ANSYS **Academic Research), ane3fl (ANSYS
    Multiphysics)-**Commercial.
    [   More
     about licensing 
    here](licensing.html)