acusim software inc., 2685 marine way, suite 1215, mountain view, california 94043 tel: (650)...

128
ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 [email protected] http://www.acusim.com Acusim Software Inc. Proprietary Information Vorticity Field from DES solution AcuSolve Training Course - December 2004

Upload: gianna-adams

Post on 15-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043Tel: (650) 988-9700 Fax: (650) 988-9770 [email protected] http://www.acusim.com

Acusim Software Inc. Proprietary Information

Vorticity Field from DESsolution

AcuSolve ™

Training Course - December 2004

Page 2: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 2

What is What is AcuSolveAcuSolve??

A powerful general-purpose finite element incompressible flow solver

AcuSolve’s differentiation Robustness Most problems solved on the first attempt

with little or no user intervention Speed Coupled solver on distributed parallel machines

scales almost linearly Accuracy Highly accurate in space and time while

globally and locally conservative on all meshes

Functionality Rich set of functionality; continuously growing

An ideal enabling technology for integrated engineering

and scientific tools

Page 3: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 3

AcuSolve MarketsAcuSolve Markets

Markets currently using AcuSolve: Automotive Electronic cooling Chemical mixing Medical and medical equipments Oil and offshore platform Boat design Train aerodynamics Universities National labs General consulting Etc. . .

Page 4: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 4

AcuSolveAcuSolve Working Models Working Models

Stand-alone solver Interfaced to a number of third party pre- and post-processors

Embedded in an integrated system

Knowledge of Application & Users

Customized GUI

Geometric Modeler

Automatic Mesh Generator

Auxiliary Pre-processor(s)

Solver: AcuSolve

Auxiliary Post-processor(s)

Visualizer

Adaptivity

Design Optimizer

Page 5: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 5

FunctionalityFunctionality

Conservation equation systems in 3D Incompressible Stokes and Navier-Stokes equations Thermal analysis and conjugate heat transfer Multi-layered thermal shell Multi-species transport equations

Radiation Gray body enclosure radiation View factor computation Solar radiation

Computational Aero-Acoustic (CAA) Support Pseudo-compressibility CAA output/interface support

Page 6: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 6

Functionality (cont)Functionality (cont)

Turbulence Models One-equation Spalart-Allmaras RANS model Smagorinsky and dynamic subgrid LES models Hybrid RANS/LES model

Arbitrary Eulerian Lagrangian (ALE) Technology Flexible mesh movement Free surface modeling Sliding mesh Rigid body interaction Fluid/Structure interaction (FSI)

Page 7: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 7

Functionality (cont)Functionality (cont)

Rotating Flows Multiple frames of reference

Component Technology Fan component Heat exchanger component

Rich Set of Material Options Newtonian and non-Newtonian fluids Porous media Melting and heat of formation User-defined function

Page 8: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 8

Functionality (cont)Functionality (cont)

Full Set of Boundary Conditions Dirichlet and Neumann boundary conditions Periodic and axisymmetric conditions Thermal periodic condition Integrated surface boundary condition General two-point constraint Experimental data imposition Dynamic BC activation Non-reflecting BC User-defined function

Page 9: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 9

Functionality (cont)Functionality (cont)

Highly Effective Solver Technology Fast and robust iterative linear solvers A novel and highly efficient iterative solver for the fully coupled

pressure/velocity equation system A companion fully coupled temperature/flow iterative equation

solver Fully parallel on shared/distributed memory machines,

transparent to user

Solution Strategy Fast steady state solver Second-order time-accurate transient analysis Automatic time-stepping algorithms

Page 10: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 10

Functionality (cont)Functionality (cont)

Advanced finite element technology Galerkin/Least-Squares finite element method Equal-order (nodal) interpolation for all solution fields, including

pressure Unstructured mesh: 4-node tetrahedron 5-node pyramid 6-node wedge 8-node brick 10-node tetrahedron

Particle Tracer Laminar Turbulent diffusion Parallel computation

Page 11: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 11

Third Party InterfaceThird Party Interface

Direct interfaces by third party: ICEM-CFD MeshSim GridPro Harpoon

Import formats: ANSYS cdb Exodus Fluent case file SDRC I-Deas

Page 12: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 12

Third Party Interface (cont)Third Party Interface (cont)

Interface to visualizers: Amira (file) CGNS (file) Ensight (direct/file) Exodus (file) FieldView (file) ICEM CFD Visual3 (direct) OpenDX (direct/file) ParaView (direct) SDRC I-Deas (file) Spectrum (file) Tecplot (CGNS) Raw Table (file)

Output data access: C/Perl/Python callable API

Page 13: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 13

ProgramsPrograms

AcuSolve is a collection of programs

Solver Programs:

Used for solving a CFD problem given a valid input file.

acuRun Run acuPrep, acuView and acuSolve in

scalar/parallel acuPrep Prepare the user data to be run by acuSolve acuView Compute viewfactor to be used by acuSolve acuSolve Solve a problem, prepared by acuPrep acuSig Signal acuSolve to perform certain actions

while it is executing

Page 14: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 14

Programs (cont)Programs (cont)

Pre-processing Programs:

Used for creating an input file and associated data file for running the solver.

acuImport Import a mesh or problem from an external format

acuSurf Extract external surfaces of a mesh

acuSif Split internal surfaces

acuProj Project solution fields to another mesh

Page 15: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 15

Programs (cont)Programs (cont)

Post-processing Programs:

Used for post processing or extracting data for post processing solver results.

acuTrans Translate acuSolve solution output to otherformats

acuTrace Generate particle traces from a solversolution

Post Processing with Third Party Software: Direct AcuSolve readers into third party software

EnSight ICEM CFD Visual3 ParaView OPENDX

Page 16: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 16

Programs (cont)Programs (cont)

User-Defined Function Programs:

Used compiling user-defined functions.

acuMakeLib Make a dynamic shared library from user codes for UNIX/LINUX platforms

acuMakeDll Make a Windows dll file from user codes

Page 17: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 17

Programs (cont)Programs (cont)

License Manager Programs:

Used for license management.

acuLmi Extract host information for issuing a license acuLmg Network license manager start, stop,

query acuLmd Network license manager daemon

acuLmg and acuLmd are UNIX/LINUX specific

Page 18: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 18

Programs (cont)Programs (cont)

There are many more utility programs See MANIFEST.txt in the distribution for a complete list

bin (supported programs):===========================================================================| File | Type | Description |===========================================================================|+acuDmg | Python | Directory management tool || acuDplace | Perl | Determine optimum dplace value for Altix || acuEnSight6To5 | Script | Convert an EnSight6 file to EnSight5 || acuFmt | Exec | ASCII/binary conversion of AcuSolve files || acuGetData | Exec | Get AcuSolve results data || acuImport | Exec | Import CFD files to AcuSolve |...

bin (unsupported programs):===========================================================================| File | Type | Description |===========================================================================| acuCheckBadTets | Script | Check for tets with internal no-slip BC || acuCheckTets | Script | Check/correct node ordering of tet mesh || acuCp | Perl | Copy an input file(s) in a new directory || acuCpi | Exec | Standard MPI PI (3.1415) test |

Page 19: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 19

Software DistributionSoftware Distribution

You can download the software distribution from http://www.acusim.com/release Follow the directions to download and install the distribution

CDROM available upon request

Obtain a valid license from your distributor Send the host and hostid obtained by running acuLmi

Obtain a set of examples from http://www.acusim.com/examples

Page 20: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 20

Supported PlatformsSupported Platforms

Platform OS

ALPHA OSF1 V4.0f

HP HP-UX 11.0

HPIPF HP-UX 11.0 (Itanium II)

LINUX Redhat 7.1 (Intel IA32)

LINUX64 (new) SuSE SLES-8 (AMD64)

LINUXIPF Redhat 2.1AW (Itanium II)

NT Windows NT/2000/XP (IA32)

SGI64 IRIX 6.5

SUN Solaris 2.7

Page 21: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 21

Parallel ModelsParallel Models

Platform Parallel Option acuRun -mp

ALPHA OpenMP (shared memory)

MPICH (TCP/IP)

Digital-MPI

PMPI (Elans)

openmp

mpi

dmpi

pmpi

HP OpenMP (shared memory)

HP-MPI (all networks)

openmp

mpi

HPIPF OpenMP (shared memory)

HP-MPI (all networks)

openmp

mpi

Page 22: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 22

Parallel ModelsParallel Models

Platform Parallel Option acuRun -mp

LINUX OpenMP (shared memory)

MPICH (TCP/IP)

HP-MPI (many networks)

MPICH-GM (Myrinet)

Scali-MPI

openmp

mpi

hpmpi

gmpi

scampi

LINUX64 MPICH (TCP/IP)

HP-MPI (many networks)

XD1 (Cray-Octigabay)

Scali-MPI

mpi

hpmpi

octmpi

scampi

LINUXIPF OpenMP (shared memory)

MPICH (TCP/IP)

HP-MPI (many networks)

MPICH-GM (Myrinet)

MPT (Altix)

openmp

mpi

hpmpi

gmpi

mpt

Page 23: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 23

Parallel ModelsParallel Models

Platform Parallel Option acuRun -mp

NT OpenMP (shared memory)

MPICH-NT (shared memory)

openmp

mpi

SGI64 SGI Shared Memory Parallel

MPICH (TCP/IP)

sgi

mpi

SUN MPICH (TCP/IP) mpi

Page 24: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 24

DocumentationDocumentation

This Tutorial Guide Three Manuals

Commands Reference Manual Online html http://www.acusim.com/doc/help/command_reference

Programs Reference Manual User Defined Function Manual Download at (the bottom of) http://www.acusim.com/release

Simple notes in the distribution directory: $ACUSIM_HOME/$ACUSIM_MACHINE/$ACUSIM_VERSION/doc

AcuSolve Quick Command Reference Online html with SI units Pointers to unit conversion tools http://www.acusim.com/doc/quick_command_reference.html

Page 25: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 25

SupportSupport

Email [email protected]

Clifton Park, NY office (primary) 518-280-8790

Mountain View, CA office 650-988-9700

Page 26: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 26

Setup EnvironmentSetup Environment

UNIX/LINUX Find and source the file .acusim (.acusim-sh on bash):source $ACUSIM_HOME/$ACUSIM_MACHINE/latest/script/.acusim

Windows Double-click on “acusim” shortcut on Desktop, or openStart->Programs->ACUSIM Software->AcuSolve V1.6 - Command Prompt This opens a Windows command prompt (DOS window)

They set environment variables ACUSIM_HOME main distribution directory ACUSIM_MACHINE platform (eg., LINUX) ACUSIM_VERSION AcuSolve version (eg., V1.6) ACUSIM_CNF_FILES List of configuration files

They set execution path$ACUSIM_HOME/$ACUSIM_MACHINE/$ACUSIM_VERSION/bin

Page 27: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 27

Channel FlowChannel Flow

Solve a laminar flow in a channel

Copy following directory to temporary location & cd to it:UNIX: $ACUSIM_HOME/$ACUSIM_MACHINE/$ACUSIM_VERSION/

examples/channel

NT: C:\Acusim\NT\%ACUSIM_VERSION%\examples\channel

Run the problem by issuing the command:

acuRun Creates a log file channel.1.Log Creates an input echo file channel.1.echo Creates a directory ACUSIM.DIR containing solution data base

Page 28: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 28

Channel Flow (cont)Channel Flow (cont)

Exact solution Parabolic velocity with maximum x-velocity of 1 Pressure drop of 0.2

Get solution statistics:

acuTrans -out -to stats

The output of this command will be similar to:

acuTrans: Variable Min Max AveacuTrans: x_velocity 0.000000e+00 1.000262e+00 5.997226e-01acuTrans: y_velocity -9.890798e-04 9.878453e-04 -9.239918e-09acuTrans: z_velocity 0.000000e+00 0.000000e+00 0.000000e+00acuTrans: pressure 3.960888e-05 2.000690e-01 1.002399e-01

Page 29: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 29

Channel Flow (cont)Channel Flow (cont)

Visualize using FieldView:

acuTrans -out -to fieldview This creates the FieldView file channel_step000009.fv

Visualize using EnSight: Open “File->Data (Reader)” and select “AcuSolve” in “Format” Set the Geometry to channel.1.Log and click OK See file doc/ensight.txt for directions on EnSight reader setup

Visualize using ICEM-CFD Visual3: Select AcuSolve file from inside of Visual3 and import file

And more options...

Page 30: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 30

Program OptionsProgram Options

Each program requires zero or more options Options may be given on the command line:

acuRun -pb channel -np 2 Options may be placed in the configuration file,

Acusim.cnf:

problem= channel

num_processors= 2and the program invoked as:

acuRun Command line options take precedence over

configuration files and defaults.

Page 31: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 31

Program Options (cont)Program Options (cont)

Each option has a (long) descriptive and a (short) abbreviated name: Following are equivalent:

acuRun -pb channel

acuRun -problem channel Following configuration options are equivalent:

pb= channel

problem= channel Short names are typically used for command line option and

long names for the configuration file.

Most options also have default values

Page 32: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 32

Program Options (cont)Program Options (cont)

Environment variable ACUSIM_CNF_FILES is used to specify multiple configuration files. By default, it is set to four files:

./Acusim.cnf Typically contains current problem configuration

~/Acusim.cnf Typically contains user’s most used configurations

$ACUSIM_HOME/$ACUSIM_MACHINE/$ACUSIM_VERSION /script/Acusim.cnf

Typically contains system and installation configurations, such as license manager information

$ACUSIM_HOME/Acusim.cnf Typically contains site specific configurations

These configuration files are searched in sequence

Page 33: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 33

Program Options (cont)Program Options (cont)

To get a list of options and values, issue the command with “-h”:

acuRun -h This produces results such as:

acuRun: Usage:acuRun: acuRun [options]acuRun: Options:acuRun: -h print usage and exitacuRun: help= TRUE [command-line]acuRun: -pb <str> problem nameacuRun: problem= channel [./Acusim.cnf]acuRun: -v <int> verbose level

acuRun: verbose= 1 [default]

acuRun: Configuration Files:

acuRun: /Acusim.cnf:~/Acusim.cnf:/acusim/SGI64/V1.6/script/Acusim.cnf

acuRun: Release: 1.6

Page 34: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 34

Program Options (cont)Program Options (cont)

Options may be: String

acuRun -pb channelproblem= channel

Enumerated (from a list of available options)

acuTrans -to ideastranslate_to= ideas

Boolean

acuRun -echoacuRun -no_echoecho_input=TRUEecho_input=FALSE

Page 35: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 35

Program Options (cont)Program Options (cont)

Integer

acuRun -np 2num_processors= 2

Real

acuSurf -angle 89.9max_angle= 89.9

To specialize an option for a program and/or a machine prepend them to the option:

SGI64.host_lists= eagle,hawk,falconacuSurf.verbose= 2SGI64.acuSurf.verbose= 3

Page 36: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 36

AcuSolveAcuSolve Input File Input File

AcuSolve input file is an ASCII file consisting of one or more commands, each having zero or more parameters.

Commands define problem parameters such as nodes, elements, boundary conditions, output, material models, solution strategy, etc.

Input file is built from an unstructured mesh obtained from any third party mesh generator.

The mesh must contain all geometric entities: nodal coordinates, element connectivity, nodal, periodic and element boundary conditions, etc.

If nodal, periodic and element boundary conditions are not available, acuSurf may be used to extract them.

Page 37: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 37

Channel Problem StatementChannel Problem Statement

Page 38: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 38

Channel Input FileChannel Input File

##*************************************************************## Copyright (c) 1994-2004 ACUSIM Software, Inc.## All rights reserved.## This source code is confidential and may not be disclosed.##*************************************************************

#==============================================================## "channel.inp": channel input file##==============================================================

#==============================================================# Global data#==============================================================

ANALYSIS { title = "Laminar channel flow" sub_title = "Reynolds number = 200" mode = static }

EQUATION { flow = navier_stokes}

Page 39: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 39

Channel Input File (cont)Channel Input File (cont)

#==============================================================# Solution Strategy#==============================================================

AUTO_SOLUTION_STRATEGY { max_time_steps = 100 convergence_tolerance = 1.e-4}

#==============================================================# Material model#==============================================================

DENSITY_MODEL( "simple fluid" ) { density = 1 }

VISCOSITY_MODEL( "simple fluid" ) { viscosity = 0.005 }

MATERIAL_MODEL( "simple fluid" ) { density_model = "simple fluid" viscosity_model = "simple fluid"}

Page 40: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 40

Channel Input File (cont)Channel Input File (cont)

#==============================================================# Coordinates#==============================================================

COORDINATE { coordinates = Read( "channel.crd" ) }

#==============================================================# Elements#==============================================================

ELEMENT_SET( "interior" ) { elements = Read( "channel.cnn" ) shape = eight_node_brick material_model = "simple fluid" }

Page 41: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 41

Channel Input File (cont)Channel Input File (cont)

#==============================================================# Inflow boundary conditions#==============================================================

SIMPLE_BOUNDARY_CONDITION( "inflow" ) { surfaces = Read( "channel.inflow.srf" ) shape = four_node_quad element_set = "interior" type = inflow inflow_type = mass_flux mass_flux = 0.66}

#==============================================================# Wall boundary conditions#==============================================================

SIMPLE_BOUNDARY_CONDITION( "wall" ) { surfaces = Read( "channel.wall.srf" ) shape = four_node_quad element_set = "interior" type = wall}

Page 42: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 42

Channel Input File (cont)Channel Input File (cont)

#==============================================================# Outflow boundary conditions#==============================================================

SIMPLE_BOUNDARY_CONDITION( "outflow" ) { surfaces = Read( "channel.outflow.srf" ) shape = four_node_quad element_set = "interior" type = outflow pressure = 0}

#==============================================================# No-cross flow nodal boundary conditions#==============================================================

NODAL_BOUNDARY_CONDITION( "no-cross flow z-velocity" ) { variable = z_velocity nodes = Read( "channel.all.nbc" ) }

Page 43: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 43

Channel Input File (cont)Channel Input File (cont)

#==============================================================# Initial conditions#==============================================================

NODAL_INITIAL_CONDITION( velocity ) { default_values = { 1, 0, 0 } }

NODAL_INITIAL_CONDITION( pressure ) { default_value = 0}

#==============================================================# Nodal output#==============================================================

NODAL_OUTPUT { output_frequency = 10 }

#==============================================================# Restart option#==============================================================

RESTART_OUTPUT { output_frequency = 10 }

Page 44: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 44

Channel Input File (cont)Channel Input File (cont)

#==============================================================# Surface outputs#==============================================================

SURFACE_OUTPUT( "inflow" ) { surfaces = Read( "channel.inflow.srf" ) shape = four_node_quad element_set = "interior" integrated_output_frequency = 1 }

SURFACE_OUTPUT( "outflow" ) { surfaces = Read( "channel.outflow.srf" ) shape = four_node_quad element_set = "interior" integrated_output_frequency = 1 }

SURFACE_OUTPUT( "wall" ) { surfaces = Read( "channel.wall.srf" ) shape = four_node_quad element_set = "interior" integrated_output_frequency = 1 }

#==============================================================# Run the problem#==============================================================

RUN

Page 45: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 45

Command FormatCommand Format

Commands have the following general syntax:COMMAND ( qualifier ) { parameter1 = value1 ... parameterN = valueN}

COMMAND is the name of the command, such as ANALYSIS qualifier (including the parentheses) is a mandatory qualifier parameter1 to parameterN are optional parameters.

Commands are format free and case insensitive, except in double quoted strings.

All text after a hash mark, “#”, is a comment; except in double-quoted strings.

ANALYSIS { mode = static # Run as static for now}

Page 46: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 46

Command Format (cont)Command Format (cont)

There are two types of commands: Functional & Declarative Functional commands perform operations at the time they are

read: AUTO_SOLUTION_STRATEGY RESTART RUN INCLUDE ASSIGN QUIT

Declarative commands define the problem parameters. They are order-independent.

NODAL_BOUNDARY_CONDITION commands may be specified before or after the COORDINATE command; even though the former depend on the latter.

Placement of functional commands is important.

Page 47: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 47

Command QualifierCommand Qualifier

Some commands require a qualifier Qualifiers distinguish one use of the command from another:

MATERIAL_MODEL( "air" ) { density_model = "air at std.

atm." viscosity_model = "air"}MATERIAL_MODEL( "aluminum" ) { density_model = "aluminum" conductivity_model = "aluminum"}

If a command accepts a qualifier, one must be given. If a command does not require a qualifier, there must be none.

Page 48: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 48

Command Qualifier (cont)Command Qualifier (cont)

There are two types of qualifiers: User-given name:

Any double-quoted string: “air”, “my #1 BC”. Used to reference a command by another command

DENSITY_MODEL( "air at std. atm." ) { density = 1.225}MATERIAL_MODEL( "air" ) { density_model = "air at std. atm." viscosity_model = "air"}

Enumerated: Select from a specific list of values:

NODAL_INITIAL_CONDITION( velocity ) {

default_values = { 1, 0, 0 }

}

Page 49: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 49

Parameter FormatParameter Format

Commands have zero or more parameters Most parameters have default values Parameters are persistent; they change only if the command is

reissued with that parameter:DENSITY_MODEL( "air with bouyancy" ) { density = 1.225}DENSITY_MODEL( "air with bouyancy" ) { expansivity = 0.0039}

Seven types of parameters: String, Enumerated, Boolean, Integer, Real, List and Array

Page 50: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 50

Parameter Format (cont)Parameter Format (cont)

String is any user-given value enclosed in a pair of double-quotes. Typically used to refer to a particular issuance of another command May contain up to 1023 characters

SIMPLE_BOUNDARY_CONDITION( "inflow" ){ element_set = "channel"}

Enumerated is a set of options available for a given parameter. Parameter shape of ELEMENT_SET command accepts:

four_node_tet, five_node_pyramid, six_node_wedge, eight_node_brick and ten_node_tet

ELEMENT_SET( "channel" ) { shape = eight_node_brick}

Page 51: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 51

Parameter Format (cont)Parameter Format (cont)

Boolean turns an option on or off. Values on, yes and true are equivalent; so are off, no and false.

TIME_INCREMENT { auto_time_increment = on}

Integer is an integer value. An integer parameter may have a valid range. Some integer values may have special meaning.

NODAL_OUTPUT { output_frequency = 10}

Real is a floating point value. A real parameter may have a valid range.

NODAL_OUTPUT { output_time_interval = 0.3}

Page 52: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 52

Parameter Format (cont)Parameter Format (cont)

List is a set of strings providing a list of user-specified commands: Order of strings in the list is important

TIME_SEQUENCE { Staggers = { "flow stagger", "turb stagger" }}

Array is a set of integers, floating point numbers, or both: The array may be specified directly in the input file:

PERIODIC_BOUNDARY_CONDITION( "axisymmetric PBC" ) { rotation_axis = { 0, 0, 0 ; 0, 0, 1 }}

The array may be read from an external file:COORDINATE { coordinates = Read( "channel.crd" )}

Page 53: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 53

Parameter Format (cont)Parameter Format (cont)

Arithmetic expressions may be used in integer, real and array parameters:ASSIGN { variable = SHIFT value = Sin( PI/8 + Asin(.3) )}MULTIPLIER_FUNCITON( "shifted half sin" ) { type = cubic_spline curve_fit_variable = time curve_fit_values = { 0.0, SHIFT + Sin(0.0*PI) ;

0.1, SHIFT + Sin(0.1*PI) ;... 1.0, SHIFT + Sin(1.0*PI) ; }

} Operations +, -, *, /, ^ (for power) and parentheses are available. Standard C math functions, Abs(x), Acos(x), ..., Tanh(x), plus

Max(x,y) and Min(x,y) are available. Variables E, PI and EPS (machine precision) are predefined.

Page 54: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 54

Parameter Format (cont)Parameter Format (cont)

Values may be read from an environment variable:SIMPLE_BOUNDARY_CONDITION( "inflow" ) { x_velocity = Env( "INLET_VELOCITY" )}

On UNIX cshell the variable is set ascshell-prompt> setenv INLET_VELOCITY 20

This is particularly useful for parametric studiesforeach vel ( 5 10 15 20 )echo "Processing velocity " $vel " …"setenv INLET_VELOCITY $velacuRunacuTrans –out –to stats > STATS.$vel

end Strings may also be imported

COORDINATES { coordinates= Read(Env("PROBLEM") . ".crd")}

Page 55: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 55

Solver CommandsSolver Commands

Problem Description Commands: ANALYSIS global analysis data EQUATION equations present in the problem

Radiation Control Commands: RADIATION global enclosure radiation param’s SOLAR_RADIATION global solar radiation parameters

Page 56: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 56

Solver Commands (cont)Solver Commands (cont)

User Control Data Command: USER_GLOBAL_DATA define and initialize globally-

accessible data

Multiplier Function Command: MULTIPLIER_FUNCTION scale values of other

commands at run time

Reference Frame Command: REFERENCE_FRAME reference frame of elements and BCs

Mesh Motion and Control Commands: MESH_MOTION mesh motion of nodes (rigid body) FLEXIBLE_BODY global FSI control parameters

Page 57: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 57

Solver Commands (cont)Solver Commands (cont)

Solution Strategy Commands: AUTO_SOLUTION_STRATEGY automatically create a

solution strategy by issuing thecommands below

TIME_SEQUENCE time stepping and staggering strategy

STAGGER linear and nonlinear solution parameters of an equation

TIME_INCREMENT time increment and control param’s CONVERGENCE_CHECK_PARAMETERS parameters for fine

tuning convergence checking TIME_INTEGRATION predictor multi-corrector integration LINEAR_SOLVER_PARAMETERS parameters for fine

tuning linear equation solvers

Page 58: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 58

Solver Commands (cont)Solver Commands (cont)

Body Force Commands: GRAVITY gravitational body force ROTATION_FORCE force due to rotating frame of

reference (obsolete)

HEAT_SOURCE volumetric heat source (Watts/kg) SPECIES_SOURCE volumetric species source BODY_FORCE collection of volumetric body forces

Page 59: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 59

Solver Commands (cont)Solver Commands (cont)

Material Model Commands: DENSITY_MODEL density model SPECIFY_HEAT_MODEL specific heat at constant

pressure VISCOSITY_MODEL viscosity model CONDUCTIVITY_MODEL thermal conductivity model DIFFUSIVITY_MODEL species diffusivity model POROSITY_MODEL porosity model for the flow equations MATERIAL_MODEL collection of material models

SURFACE_TENSION_MODEL surface tension for free surf. CONTACT_ANGLE_MODEL contact angle for free

surface

EMISSIVITY_MODEL emissivity for a radiation surface SOLAR_RADIATION_MODEL solar radiation model

Page 60: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 60

Solver Commands (cont)Solver Commands (cont)

Nodal Data Commands: COORDINATE nodal coordinates NODAL_INITIAL_CONDITION nodal initial conditions NODAL_BOUNDARY_CONDITION nodal BCs PERIODIC_BOUNDARY_CONDITION periodic BCs on

pairs of nodes NODAL_OUTPUT nodal output

parameters DERIVED_QUANTITY_OUTPUT output derived-quantities RUNNING_AVERAGE_OUTPUT output running-averaged

fields TIME_AVERAGE_OUTPUT output time-averaged fields TIME_HISTORY_OUTPUT nodal output for a set of

prescribed points NODAL_RESIDUAL_OUTPUT output nodal residuals

Page 61: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 61

Solver Commands (cont)Solver Commands (cont)

Element Data Commands: ELEMENT_SET set of elements FAN_COMPONENT fan component HEAT_EXCHANGER_COMPONENT heat exchanger

component LINE_SOURCE source on an arbitrary line ELEMENT_OUTPUT output element-integrated

data CAA_OUTPUT output CAA sample data

Page 62: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 62

Solver Commands (cont)Solver Commands (cont)

Surface Data Commands: SIMPLE_BOUNDARY_CONDITION common BC ELEMENT_BOUNDARY_CONDITION element BC SURFACE_INTEGRATED_CONDITION integrated BC on a

surface FREE_SURFACE free surface TURBULENCE_WALL turbulent boundary layer wall RADIATION_SURFACE radiation heat flux on a surface SOLAR_RADIATION_SURFACE solar radiation heat flux on a

surface PARTICLE_SURFACE surface type for particle tracing INTERFACE_SURFACE sliding mesh & tied interface GUIDE_SURFACE guide moving mesh on a

surface SURFACE_OUTPUT output fluxes on surface

Page 63: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 63

Solver Commands (cont)Solver Commands (cont)

Restart Commands: RESTART_OUTPUT output restart files RESTART restart from a previously

solved problem

Run Command: RUN process the input data for the solver

Auxiliary Commands: INCLUDE include the content of an

external file ASSIGN assign a value to a variable QUIT terminate parsing the input file

Page 64: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 64

AcuSolve Quick Reference ManualAcuSolve Quick Reference Manual

http://www.acusim.com/doc/quick_command_reference.html

Parameter Name (Abbr.) Type Default Unit in SI Limits

Enum Values (Abbr.)

DENSITY_MODEL( user_name )

type

enum constant

constant (const) boussinesq piecewise_linear (linear) cubic_spline (spline) user_function (user)

density (dens) real 1 kg/m3 >0

expansivity (expans) real 1 1/K >=0

curve_fit_values  (curve_values) array {0,1} kg/m3

curve_fit_variable  (curve_var)

enum temperature

pressure (pres) temperature (temp) species_1 (spec1) species_2 (spec2) species_3 (spec3) species_4 (spec4) species_5 (spec5) species_6 (spec6) species_7 (spec7) species_8 (spec8) species_9 (spec9)

user_function  (user) str undefined

Page 65: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 65

Geometry FormatGeometry Format

Coordinates file is used in the COORDINATE command Four columns: nodeId, x, y, z:

55 2.665469971e+00 -1.166600037e-01 5.348399658e-0156 2.706250000e+00 -5.883300171e-01 5.315200195e-0157 3.203280029e+00 -6.015100098e-01 4.880200195e-01

Nodal BC file is used in the NODAL_BOUNDARY_CONDITION command Single column: nodeId

566676

Page 66: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 66

Geometry Format (cont)Geometry Format (cont)

Nodal Initial Condition file is used in the NODAL_INITIAL_CONDITION command Multi-columns: nodeId, field values (e.g., velocity):

55 1.0 0 056 1.1 0 057 1.2 0 0

Periodic BC file is used in the PERIODIC_BOUNDARY_CONDITION command Three columns: pairId, node1, node2:

1 55 1552 65 1653 75 175

Page 67: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 67

Geometry Format (cont)Geometry Format (cont)

Element Connectivity file is used in the ELEMENT_SET command Multi-columns: elementId, node1, ..., nodeN (e.g., 4-node tet):

121 85 102 86 90122 85 102 90 89123 102 90 89 178124 85 101 102 89

Page 68: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 68

Geometry Format (cont)Geometry Format (cont)

Surface Connectivity file is used in commands: ELEMENT_BOUNDARY_CONDITION FAN_COMPONENT FREE_SURFACE GUIDE_SURFACE HEAT_EXCHANGER_COMPONENT INTERFACE_SURFACE PARTICLE_SURFACE RADIATION_SURFACE SIMPLE_BOUNDARY_CONDITION SOLAR_RADIATION_SURFACE SURFACE_INTEGRATED_CONDITION SURFACE_OUTPUT TURBULENCE_WALL

Page 69: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 69

Geometry Format (cont)Geometry Format (cont)

Surface Connectivity (cont): Multi-columns: elementId, surfaceId, node1, ..., nodeN (e.g., 3-

node triangle):

121 1 85 102 86122 2 85 102 90123 3 102 90 89124 4 85 101 102

Program acuSurf may be used to extract and/or convert into this format

Page 70: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 70

OutputOutput

AcuSolve generates four types of output data Nodal, such as nodal output at a certain time step Time Series, such as integrated mass flux at inlet as a function

of time/time step Surface Nodes, such as heat flux at each node of a wall

surface at a certain time step CAA sample data, such as divergence of Lighthill stress

acuTrans may be used to translate from internal format Get statistics on nodal velocity at steps 5 through 15

acuTrans –out –outv velocity –to stats –ts 5:15 Translate mass flux at inflow to a raw table

acuTrans –osi –osiv mass –osis "inflow" –to table Translate heat flux at nodes of the wall to a raw table

acuTrans –osf –osfv heat –osfs "wall surface" –to table

Page 71: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 71

Output (cont)Output (cont)

Surface Nodes output fields may be collected for all nodes for ease of viewing Translate heat fluxes of all surface output nodes to a raw table

acuTrans –out –extout -outv surface_heat_flux –to table

Nodes not in any available surface output will have zero values

Visualize all available Nodal and Surface Nodes data with FieldView do

acuTrans –out –extout –to fieldview

Visualize all available Nodal and Surface Nodes data with EnSight or Visual3, put the following in Acusim.cnf

Extended_nodal_output= TRUE

Page 72: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 72

Output FieldsOutput Fields

Solver Command acuTrans Option Data Type

NODAL_OUTPUT nodal_output Nodal

RUNNING_AVERAGE_OUTPUT running_average_output Nodal

TIME_AVERAGE_OUTPUT time_average_output Nodal

DERIVED_QUANTITY_OUTPUT derived_quantity_output Nodal

SURFACE_OUTPUT surface_output Surface Nodes

SURFACE_OUTPUT surface_integral_output Time Series

RADIATION_SURACE output_radiation_surface Surface Nodes

RADIATION_SURACE output_radiation_integral Time Series

SOLAR_RADIATION_SURFACE output_solar_radiation_surface Surface Nodes

SOLAR_RADIATION_SURFACE output_solar_radiation_integral Time Series

ELEMENT_OUTPUT element_integral_output Time Series

TIME_HISTORY_OUTPUT time_history_output Time Series

FAN_COMPONENT fan_component_output Time Series

HEAT_EXCHANGER_COMPONENT heat_exchanger_component_output Time Series

NODAL_RESIDUAL_OUTPUT output_nodal_residual Nodal

CAA_OUTPUT aero_acoustic_output Sample

Page 73: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 73

Cross Platform CompatibilitiesCross Platform Compatibilities

All internal files are stored in ACUSIM.DIR directory They are accesses through ADB (libadb.a) C-callable API &

Python through “import acudb” Perl through “use Acudb ;” Shell through acuGetData program

All programs (eg., acuTrans) are written on top of ADB Vast majority of the files are in binary

ADB handles all cross platform binary compatibilities Files written on one platform may be read on any platform

All supported programs can read ASCII files generated on Windows The Windows end-of-line carriage return (Cntl-M) character is

properly handled on all platforms

Page 74: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 74

Boundary ConditionsBoundary Conditions

There are two boundary condition basic types: Dirichlet typically a condition on the field variables Neumann typically a flux condition

Boundary condition equivalence:

This classification is not entirely one-to-one. Pressure may be either a Dirichlet or Neumann condition

We prefer Nodal and Element BC It reflects implementation and usage

Dirichlet Neumann

Nodal Element

Strong Weak

Essential Natural

Page 75: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 75

Boundary Conditions (cont)Boundary Conditions (cont)

Nodal and Element BCs are conjugates For flow equations:

Nodal boundary condition Element boundary condition

x-velocity, x-traction,

y-velocity, y-traction,

z-velocity, z-traction,

normal-velocity, pressure,

tangential-velocity, tangential-traction,

pressure, mass flux,

xu

yu

zu

nu

tu

p

( I )x nxt p

nm u

( I )y nyt p ( I )z nzt p

n nnt p

t ntt

Page 76: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 76

Boundary Conditions (cont)Boundary Conditions (cont)

Boundary condition precedence:

Element boundary condition of type “free” means that boundary condition value is taken from the current solution

By default, mass flux is of type free Precedence may be used to favor one boundary condition over

another imposed on the same node

Nodal BC Element BC Consequence

Specified Specified Nodal BC is satisfied; Element BC is ignored

Specified Not specified Nodal BC is satisfied

Not specified Specified Element BC is satisfied

Not specified Not specified Element BC with zero/free value is assumed and satisfied

Page 77: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 77

Boundary Conditions (cont)Boundary Conditions (cont)

Inflow condition: All three velocity components are specified Mass flux is set to “inflow” (which is a special case of “free”) All scalar fields (temperature, turbulence eddy viscosity, species) are specified

For example:SIMPLE_BOUNDARY_CONDITION( "inlet" ) { surfaces = Read( "channel.inlet.ebc" ) shape = four_node_quad element_set = "flow" type = inflow x_velocity = 5 y_velocity = 0 z_velocity = 0 temperature = 20 species_1 = 1 eddy_viscosity = 0.001}

Page 78: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 78

Boundary Conditions (cont)Boundary Conditions (cont)

Inflow condition (cont) SIMPLE_BOUNDARY_CONDITION supports the

following inflow types: velocity impose three components of velocity pressure impose pressure at inlet stagnation_pressure impose stagnation pressure at inlet mass_flux impose mass flux flow_rate impose flow rate

In mass_flux and flow_rate types, velocity and eddy-viscosity profiles are internally computed

Page 79: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 79

Boundary Conditions (cont)Boundary Conditions (cont)

Outflow condition: Pressure is specified as an element boundary condition Mass flux is set to “outflow” (which is a special case of “free”) Tangential traction, heat flux, species flux, and turbulence flux

are set to free

For example:SIMPLE_BOUNDARY_CONDITION( "outlet" ) { surfaces = Read( "channel.outlet.ebc" )

shape = four_node_quad element_set = "flow" type = outflow pressure = 0}

Page 80: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 80

Boundary Conditions (cont)Boundary Conditions (cont)

No-slip wall: All three velocity components are set to zero (in the wall reference frame) Either heat flux or temperature is specified; similarly for species Turbulence eddy viscosity is zero; turbulence wall is defined

For example:SIMPLE_BOUNDARY_CONDITION( "wall surface" ) { surfaces = Read( "channel.wall.ebc" ) shape = four_node_quad element_set = "flow" type = wall reference_frame = "rotating disc" temperature_type = flux heat_flux = 250 convective_heat_coefficient = 35 convective_heat_reference_temperature = 20 species_1_type = value species_1 = 5}

Page 81: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 81

Boundary Conditions (cont)Boundary Conditions (cont)

Slip wall and symmetric condition: Normal component of velocity is zero All fluxes are zero

For example:SIMPLE_BOUNDARY_CONDITION( "symmetry" ) { surfaces = Read( "channel.sym.ebc" ) shape = four_node_quad element_set = "flow" type = slip}

Page 82: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 82

Boundary Conditions (cont)Boundary Conditions (cont)

Axisymmetric condition: All nodal variables No flux specification is needed

For example:PERIODIC_BOUNDARY_CONDITION( "axisym. planes" ){ nodal_pairs = Read( "pipe.axi.pbc" ) variable = all type = axisymmetric rotation_axis = { 0, 0, 0;

0, 0, 1 }}

Other periodic conditions: Depends on the condition

Page 83: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 83

Boundary Conditions (cont)Boundary Conditions (cont)

All velocity boundary condition: When velocity is imposed on all boundaries of the domain, a pressure

nodal BC must be imposed on one and only one node (per enclosure)

AcuSolve has a rich set of boundary conditions; see commands: ELEMENT_BOUNDARY_CONDITION FREE_SURFACE NODAL_BOUNDARY_CONDITION PERIODIC_BOUNDARY_CONDITION RADIATION_SURFACE SIMPLE_BOUNDARY_CONDITION SOLAR_RADIATION_SURFACE SURFACE_INTEGRATED_CONDITION TURBULENCE_WALL

Page 84: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 84

Solution StrategySolution Strategy

Simplest way to set up a strategy is via AUTO_SOLUTION_STRATEGY

ANALYSIS { type = transient}EQUATION { flow = navier_stokes temperature = advective_diffusive radiation = enclosure turbulence = spalart_allmaras}AUTO_SOLUTION_STRATEGY { max_time_steps = 100 initial_time_increment = 1}

AUTO_SOLUTION_STRATEGY is a functional command Its position in the file is important Reads parameters of ANALYSIS and EQUATION commands Devises a solution strategy, writes it in file <problem>.ss.inc It includes the file in its place

Page 85: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 85

Example.ss.incExample.ss.inc

TIME_SEQUENCE { min_time_steps = 1 max_time_steps = 100 final_time = 0 convergence_tolerance = 0 termination_delay = 0 lhs_update_initial_times = 1 lhs_update_frequency = 1 min_stagger_iterations = 2 max_stagger_iterations = 2 stagger_convergence_tolerance = 0.001 stagger_lhs_update_frequency = 1 staggers = { "flow", "turbulence", "temperature", "radiation" }}

Page 86: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 86

Example.ss.inc (cont)Example.ss.inc (cont)

STAGGER( "flow" ) { equation = flow min_stagger_iterations = 1 max_stagger_iterations = 1 convergence_tolerance = 0.1 lhs_update_frequency = 1 linear_solver = gmres min_linear_solver_iterations = 10 max_linear_solver_iterations = 1000 num_krylov_vectors = 10 linear_solver_tolerance = 0.1 projection = off pressure_projection = on pressure_projection_tolerance = 0.01 velocity_projection = off velocity_projection_tolerance = 0.1}

STAGGER( "turbulence" ) { ...}...

Page 87: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 87

Example.ss.inc (cont)Example.ss.inc (cont)

TIME_INCREMENT { initial_time_increment = 1 auto_time_increment = off local_time_increment = off min_time_increment = 0 max_time_increment = 0 cfl_control = off cfl_number = 1000 initial_cfl_number = 1 min_cfl_number = 0 time_increment_decrease_factor = 0.25 time_increment_increase_factor = 1.25 time_increment_increase_delay = 4 min_time_increment_ratio = 0.1 multiplier_function = "none"}

Page 88: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 88

Example.ss.inc (cont)Example.ss.inc (cont)

TIME_INTEGRATION { predictor = same_v initialize_acceleration = off lumped_mass_factor = 1 time_integration_order = second high_frequency_damping_factor = 1}

Page 89: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 89

Example.ss.inc (cont)Example.ss.inc (cont)

LINEAR_SOLVER_PARAMETERS { lhs_storage = reduced_memory_sparse min_num_iteration_ratio = 0.5 num_pressure_projection_vectors = 10 ...}

CONVERGENCE_CHECK_PARAMETERS { pressure_residual_check = standard pressure_solution_increment_check = looser_by_10 ...}

Page 90: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 90

Advance Solution StrategyAdvance Solution Strategy

AUTO_SOLUTION_STRATEGY is sufficient for most problems Its generated parameters may be overwritten like

AUTO_SOLUTION_STRATEGY { max_time_steps = 100 initial_time_increment = 1}TIME_SEQUENCE { min_stagger_iterations = 1 max_stagger_iterations = 4}

Major modifications done in <problem>.ss.inc and included like

#AUTO_SOLUTION_STRATEGY {# max_time_steps = 100# initial_time_increment = 1#}INCLUDE { file = "example.ss.inc.mod"

}

Page 91: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 91

Steady Solution StrategySteady Solution Strategy

For steady state problems AUTO_SOLUTION_STRATEGY accepts

ANALYSIS { type = steady }

AUTO_SOLUTION_STRATEGY { max_time_steps = 100 initial_time_increment = 1.e+10 convergence_tolerance = 1.e-3 num_krylov_vectors = 10 temperature_flow = off relaxation_factor = 0 }

Page 92: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 92

Transient Solution StrategyTransient Solution Strategy

For transient problems AUTO_SOLUTION_STRATEGY accepts

ANALYSIS { type = transient } AUTO_SOLUTION_STRATEGY { max_time_steps = 100 initial_time_increment = 1 final_time = 0 auto_time_increment = off min_time_increment = 0 max_time_increment = 0 convergence_tolerance = 1.e-3 num_krylov_vectors = 10 temperature_flow = off relaxation_factor = 0 }

Page 93: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 93

Time Stepping Pseudo CodeTime Stepping Pseudo Code

Loop over time steps Predict all active solution fields Loop over staggers Stagger 1:

Loop over nonlinear iterations Form stagger residual and if needed LHS matrix Solve linear equation system Update stagger solution field(s) Check nonlinear convergence

End nonlinear loop ... Stagger N: Loop over nonlinear iterations

Form stagger residual and if needed LHS matrix Solve linear equation system Update stagger solution field(s) Check nonlinear convergence

End nonlinear loop Check stagger convergence

End stagger loop Check time step convergence Optionally compute and output results Determine time increment of the next time step End time step loop

Page 94: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 94

AcuSolve Log FileAcuSolve Log File

acuRun: Tue Jun 22 17:41:34 2004acuRun: acuRun acuRun: Processing run 1 ...acuRun: Hostname = pelicanacuRun: Release = 1.6acuRun: Reseting num_subdomains to 2acuRun: Run acuPrep ...acuRun: /usr/acusim/SGI64/latest/bin/acuPrep -nsd 2acuPrep: Date = Tue Jun 22 17:41:34 2004acuPrep: Problem = channelacuPrep: Run = 1acuPrep: Hostname = pelicanacuPrep: Platform = IRIX64 6.5 IP30acuPrep: Release = 1.6acuPrep: Release date = May 17 2004acuPrep: Number of subdomains = 2acuPrep: Working directory = ACUSIM.DIRacuPrep: ------------------------------------------------------------------acuPrep: Reading ANALYSISacuPrep: Reading EQUATIONacuPrep: Reading AUTO_SOLUTION_STRATEGYacuPrep: Processing AUTO_SOLUTION_STRATEGYacuPrep: AUTO_SOLUTION_STRATEGY: creating and including "channel.ss.inc" ...acuPrep: Reading TIME_SEQUENCE...

Page 95: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 95

AcuSolve Log File (cont)AcuSolve Log File (cont)

acuPrep: Reading RUNacuPrep: Processing RUNacuPrep: Processing ANALYSIS...acuPrep: ------------------------------------------------------------------acuPrep: Minimum coordinates = 0.0000e+00 0.0000e+00 -5.0000e-01acuPrep: Maximum coordinates = 5.0000e+00 1.0000e+00 5.0000e-01acuPrep: Total nodes = 462acuPrep: Total elements = 200acuPrep: Total aggl. rad. surfaces = 0acuPrep: Total interface surfaces = 0acuPrep: ------------------------------------------------------------------acuPrep: Output data = Subdomain 0acuPrep: Output data = Subdomain 1acuPrep: Output data = Domain decompositionacuPrep: Output data = Surface outputacuPrep: ------------------------------------------------------------------acuPrep: Input CPU/Elapse time = 2.000000e-02 3.856611e-02 SecacuPrep: Proc. CPU/Elapse time = 6.000000e-02 6.061101e-02 SecacuPrep: Solar CPU/Elapse time = 0.000000e+00 0.000000e+00 SecacuPrep: DDC CPU/Elapse time = 1.000000e-02 6.816149e-03 SecacuPrep: Output CPU/Elapse time = 1.000000e-02 1.321316e-02 SecacuPrep: Total CPU/Elapse time = 1.000000e-01 1.192601e-01 SecacuPrep: Total Memory Size = 5.274734e-01 Mbytes

Page 96: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 96

AcuSolve Log File (cont)AcuSolve Log File (cont)

acuRun: -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-acuRun: No enclosure radiation found: Bypassing acuViewacuRun: -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-acuRun: Run acuSolve ...acuRun: setenv MP_SET_NUMTHREADS 2acuRun: setenv OMP_NUM_THREADS 2acuRun: setenv OMP_DYNAMIC FALSEacuRun: setenv MPC_GANG OFFacuRun: /usr/acusim/SGI64/latest/bin/acuSolve -np 1 -nt 2acuSolve: -------------------------------------------------------------acuSolve: Checked out a license [expiration Jul-01-2004]acuSolve: -------------------------------------------------------------acuSolve: Date = Tue Jun 22 17:41:35 2004acuSolve: Problem = channelacuSolve: Run = 1acuSolve: Title = Laminar channel flow...acuSolve: ---------------------- Input Phase --------------------------acuSolve: Input CPU/Elapse time = 8.000000e-02 1.488740e-01 SecacuSolve: Input Memory Usage = 2.156250e+01 MbytesacuSolve: ---------------------- Begin Time Step ----------------------

Page 97: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 97

AcuSolve Log File (cont)AcuSolve Log File (cont)

acuSolve: Time-Step= 1 ; timeInc= 1.000000e+10 ; time= 0.000000e+00acuSolve: Flow stagger "flow": FORM-LHSacuSolve: pressure res ratio = 6.502975e-03acuSolve: velocity res ratio = 3.020141e-01acuSolve: CGP No iterations = 18acuSolve: CGP 0/1/n norms = 1.663758e-06 3.519194e-06 1.492078e-08acuSolve: GMRES No iterations = 10 (1.00)acuSolve: GMRES 0/1/n norms = 5.203500e-06 6.914778e-06 4.665201e-07acuSolve: pressure sol ratio = 0.000000e+00acuSolve: velocity sol ratio = 3.160952e-01acuSolve: CFL timeInc = 2.500000e-01acuSolve: Step CPU/Elapse time = 1.700000e-01 1.712790e-01 Sec...acuSolve: ----------------------- End Time Step -----------------------acuSolve: Input CPU/Elapse time= 8.000000e-02 1.488740e-01 SecacuSolve: Output CPU/Elapse time= 9.000000e-02 9.963417e-02 SecacuSolve: Exchange CPU/Elapse time= 6.000000e-02 4.121375e-02 SecacuSolve: Intf.search CPU/Elapse time= 0.000000e+00 0.000000e+00 SecacuSolve: Flow stagger "flow":acuSolve: No of res/lhs formations = 8 8acuSolve: Elem.Form CPU/Elapse time= 6.500000e-01 6.821222e-01 SecacuSolve: Solution CPU/Elapse time= 4.100000e-01 3.928375e-01 SecacuSolve: Total CPU/Elapse time = 1.240000e+00 1.344299e+00 SecacuSolve: Total Memory Usage = 2.159375e+01 MbytesacuRun: -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-acuRun: Tue Jun 22 17:41:36 2004

Page 98: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 98

Convergence CheckConvergence Check

Convergence is checked on residual & solution increment ratios Computed separately for each variable/equation Convergence occurs when all measures satisfy tolerance

Residual ratio is the norm of residual (out-of-balance forces) normalized by the forces making up the residual It is a local and canonical measure Does not dependent on historical data It is fairly problem independent

Solution increment ratio is the norm of the solution increment normalized by the norm of the solution Same properties as residual ratio

Page 99: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 99

Monitoring ConvergenceMonitoring Convergence

To monitor convergence execute acuMon This requires Java 1.4

installed on your system

Alternatively execute acuProbe Available on Windows,

LINUX, HP and SGI64 May require special

installation

Page 100: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 100

Signal a Running JobSignal a Running Job

Use acuSig to signal a running acuSolve job Stop a running job at the end of current time step (clean stop)

acuSig -stop Stop a running job as soon as possible

acuSig -halt Stop a running job after a certain time step is completed

acuSig –sts 200 Signal a running job to output its results at the end of current

time stepacuSig -out

Send a value to a USER_GLOBAL_DATAacuSig –data x=45

And many more, doacuSig –help

Page 101: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 101

User Defined FunctionUser Defined Function

User Defined Function (UDF) may be used with commands: Body Force:

GRAVITY HEAT_SOURCE SPECIES_SOURCE

Material Model: DENSITY_MODEL SPECIFIC_HEAT_MODEL VISCOSITY_MODEL CONDUCTIVITY_MODEL DIFFUSIVITY_MODEL SURFACE_TENSION_MODEL EMISSIVITY_MODEL

Page 102: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 102

User Defined Function (cont)User Defined Function (cont)

Commands using UDF (cont): Multiplier Function:

MULTIPLIER_FUNCTION Mesh Motion:

MESH_MOTION Component Model:

FAN_COMPONENT HEAT_EXCHANGER_COMPONENT

Boundary Conditions: NODAL_BOUNDARY_CONDITION ELEMENT_BOUNDARY_CONDITION PERIODIC_BOUNDARY_CONDITION

Output: ELEMENT_OUTPUT

Page 103: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 103

User Defined Function (cont)User Defined Function (cont)

Four steps are needed to use user-defined functions: Write a user-defined function, in C or Fortran (with a C cover

function) Reference it in the input file Compile and link the code into a shared library, using

acuMakeLib on UNIX/LINUX acuMakeDll on Windows

Run it acuRun on either UNIX/LINUX or Windows

Page 104: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 104

Client Server ExampleClient Server Example

Simple channel flow problem Parabolic inflow velocity is scaled/controlled to achieve

a target pressure drop Objectives is to learn and practice:

User Defined Function (UDF) Client-server functionality Active flow control using UDF and MULTIPLIER_FUNCTION

Get the problem from http://www.acusim.com/examples/client_server.tgz

Note that there are simpler ways of solving this problem

Page 105: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 105

Client Server Communication ModelClient Server Communication Model

Assume AcuSolve is running on 4 processor Assume external program is running on 1 processor

Processor 1

Processor 2

Processor 3

Processor 4

AcuSolve

usrPerl.pl

External Program

Transparent to the user

Page 106: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 106

Client Server Input FileClient Server Input File

A Multiplier Function is used as the control mechanism

MULTIPLIER_FUNCTION( "inflow pressure control" ) { type = user_function user_function = "usrClientServer" user_values = { 4, # target pressure 1, # initial MF 0 } # verbose user_strings = { "usrPres.pl",# command "inflow" } # surface output evaluation = once_per_time_step}

Use an external program usrPres.pl written in Perl in this case On Windows use: "perl usrPres.pl" For remote machines: "rsh eagle usrPres.pl"

You may need the full path Pressure (normal component of traction) is extracted from the

surface output "inflow"

Page 107: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 107

Client Server Input File (cont)Client Server Input File (cont)

Nodal velocity is scaled by the multiplier functionNODAL_BOUNDARY_CONDITION( "inflow x-vel" ) { variable = x_velocity type = cubic_spline nodes = Read( "channel.inflow.nbc" ) curve_fit_values = { 0,0 ; 0.5,1 ; 1,0 } curve_fit_variable = y_coordinate multiplier_function = "inflow pressure control"}

Pressure is measured by

SURFACE_OUTPUT( "inflow" ) { surfaces = Read( "channel.inflow.srf" ) shape = four_node_quad element_set = "interior" integrated_output_frequency = 1 }

Page 108: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 108

Client Server Input File (cont)Client Server Input File (cont)

Multiplier functions can directly or indirectly affect other multiplier functions

USER_GLOBAL_DATA( "inflow pressure control" ) { value = 1}

MULTIPLIER_FUNCTION( "inflow pressure control 2" ) { type = user_global_data user_global_data = "inflow pressure control" dependencies = { "inflow pressure control" }}

MULTIPLIER_FUNCTION( "inflow pressure control 3" ) { type = piecewise_linear curve_fit_values = { 0, 0 ; 100, 100 } curve_fit_variable = user_global_data curve_fit_variable_qualifier = "inflow pressure control" dependencies = { "inflow pressure control" }}

Page 109: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 109

Client Server User FunctionClient Server User Function

/****************************************************************************** Copyright (c) 1994-2004 ACUSIM Software, Inc.** All rights reserved.** This source code is confidential and may not be disclosed.****************************************************************************/

/*===========================================================================**** "usr.c": User Defined Function****===========================================================================*/#include "acusim.h"#include "udf.h"

/*=========================================================================== * * Prototype the function * *=========================================================================== */UDF_PROTOTYPE(usrClientServer) ;

Page 110: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 110

Client Server User Function (cont)Client Server User Function (cont)

/*=========================================================================== * * "usrClientServer": A client/server example * * Arguments: * udfHd - opaque handle for accessing information * outVec - output vector * nItems - number of items in outVec (=1 in this case) * vecDim - vector dimension of outVec (=1 in this case) * * Input file parameters: * user_values = { <target pres>, <initial value>, <verbose> } * user_strings = { <external command>, <inflow surface_output> } * *=========================================================================== */Void usrClientServer( UdfHd udfHd, Real* outVec, Integer nItems, Integer vecDim ){

Page 111: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 111

Client Server User Function (cont)Client Server User Function (cont)

Real mfValue ; /* MF return value */ Real targPres ; /* target pressure */ Real verbose ; /* verbose level */ Real* trac ; /* pointer to surface traction */ Real* usrVals ; /* user supplied values */ String command ; /* execution command */ String inflowOsi ; /* inflow surface output */ String* usrStrs ; /* user supplied strings */ char buffer[1024] ; /* a string buffer */ char* name ; /* name of the UDF *//*--------------------------------------------------------------------------- * Get the user data *--------------------------------------------------------------------------- */ udfCheckNumUsrVals( udfHd, 3 ) ; udfCheckNumUsrStrs( udfHd, 2 ) ; usrVals = udfGetUsrVals( udfHd ) ; usrStrs = udfGetUsrStrs( udfHd ) ; targPres = usrVals[0] ; mfValue = usrVals[1] ; verbose = usrVals[2] ; command = usrStrs[0] ; inflowOsi = usrStrs[1] ;

Page 112: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 112

Client Server User Function (cont)Client Server User Function (cont)

/*--------------------------------------------------------------------------- * Start the client *--------------------------------------------------------------------------- */ if ( udfFirstCall(udfHd) ) { sprintf( buffer, "%s %g %g %g", command, targPres, mfValue, verbose ) ; udfOpenPipePrim( udfHd, buffer ) ; }

Page 113: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 113

Client Server User Function (cont)Client Server User Function (cont)

/*--------------------------------------------------------------------------- * Get the data *--------------------------------------------------------------------------- */ if ( !udfFirstStep(udfHd) ) { trac = udfGetOsiData( udfHd, inflowOsi, UDF_OSI_TRACTION ) ; udfWritePipe( udfHd, "pressure= %.16g", -trac[0] ) ; udfReadPipe( udfHd, buffer, 1024 ) ; sscanf( buffer, "%*s %le", &mfValue ) ; if ( fabs(-trac[0]-targPres) > 1.e-4*fabs(targPres) ) { udfSetSig( udfHd, UDF_SIG_NO_CONV, 0 ) ; } }/*--------------------------------------------------------------------------- * Store the data *--------------------------------------------------------------------------- */ outVec[0] = mfValue ;

Page 114: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 114

Client Server User Function (cont)Client Server User Function (cont)

/*--------------------------------------------------------------------------- * Save the data in a global data *--------------------------------------------------------------------------- */ name = udfGetName( udfHd ) ; udfCheckUgd( udfHd, name ) ; udfSetUgdData( udfHd, name, mfValue ) ;

} /* end of usrClientServer() */

Page 115: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 115

Client Server Compile/LinkClient Server Compile/Link

On UNIX/LINUX build the shared library by running

acuMakeLib On SGI64, this produces results such as acuMakeLib: Creating Makefile ... acuMakeLib: Source files = usr.c acuMakeLib: make clean libusr.so

rm -f libusr.so usr.o cc -64 -DACUSIM_SGI64 -c -I/usr/acusim/SGI64/latest/include -O usr.c ld -o libusr.so -64 -mips4 -shared -all usr.o -lc -lm

Library libusr.so is then opened by acuSolve at run time See option user_libraries of acuSolve or acuRun:

acuRun -help | grep user_libraries

Page 116: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 116

Client Server Compile/Link (cont)Client Server Compile/Link (cont)

On Windows build the shared library by running

acuMakeDll This produces results such as

acuMakeDll: Using Visual Studio C Compiler <cl>acuMakeDll: Using Digital Fortran F77 Compiler <f77>acuMakeDll: Source files = usr.cacuMakeDll: Remove objects = usr.objacuMakeDll: cl -c -DACUSIM_NT "-IC:\Acusim\NT\V1.6\include" -O2 -Oa usr.cMicrosoft(R)32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

usr.cacuMakeDll: link -dll -out:libusr.dll usr.obj C:/Acusim/NT/V1.6/bin/acuSolve.libMicrosoft (R) Incremental Linker Version 6.00.8168Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

Creating library libusr.lib and object libusr.exp

Library libusr.dll is then opened by acuSolve at run time

Page 117: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 117

Client Server External ProgramClient Server External Program

External program may be written in any language Read AcuSolve generated data as stdin (standard in)

Read one ASCII line at a time Write results to stdout (standard out)

Write one ASCII line at a time Make sure standard out is flushed

Communication prototype (handshake) is up to the user

Page 118: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 118

Client Server usrPres.plClient Server usrPres.pl

#!/usr/bin/env perl##***************************************************************************## Copyright (c) 1994-2004 ACUSIM Software, Inc.## All rights reserved.## This source code is confidential and may not be disclosed.##***************************************************************************

#===========================================================================## "usrPres.pl": User client perl script##===========================================================================

#===========================================================================# Force line buffering#===========================================================================

$| = 1 ;

Page 119: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 119

Client Server usrPres.pl (cont)Client Server usrPres.pl (cont)

#===========================================================================# Get the parameters#===========================================================================

if ( scalar(@ARGV) != 3 ) { die "Usage: $0 target_pressure initValue verbose" ;}

$targPres = shift @ARGV ;$mf = shift @ARGV ;$verbose = shift @ARGV ;

$atFct = 0.8 ; # attenuation factor

Page 120: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 120

Client Server usrPres.pl (cont)Client Server usrPres.pl (cont)

#===========================================================================# Loop through steps#===========================================================================

while( <> ) { chomp ; $line = $_ ; if ( $line !~ /\Apressure= (.*)\Z/ ) { die "Invalid line: $_\n" ; } $mfPrev = $mf ;

Page 121: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 121

Client Server usrPres.pl (cont)Client Server usrPres.pl (cont)

#===========================================================================# Do a continuous and attenuated least-squares fit: # mf = a1 pres + a2 pres^2#===========================================================================

$p1 = $1 ; $p2 = $p1 * $p1 ;

$lhs11 = $atFct * $lhs11 + $p1 * $p1 ; $lhs12 = $atFct * $lhs12 + $p1 * $p2 ; $lhs22 = $atFct * $lhs22 + $p2 * $p2 ; $res1 = $atFct * $res1 + $p1 * $mf ; $res2 = $atFct * $res2 + $p2 * $mf ;

$d = $lhs11 * $lhs22 - $lhs12 * $lhs12 ; if ( $d > 1.e-8 * ($lhs11 * $lhs22) ) { $a1 = (+$lhs22 * $res1 - $lhs12 * $res2) / $d ; $a2 = (-$lhs12 * $res1 + $lhs11 * $res2) / $d ; $mf = ($a2 * $targPres + $a1) * $targPres ; } elsif ( $lhs11 > 0 ) { $a1 = $res1 / $lhs11 ; $mf = $a1 * $targPres ; }

Page 122: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 122

Client Server usrPres.pl (cont)Client Server usrPres.pl (cont)

#===========================================================================# Return the results#===========================================================================

$mf = 2.0 * $mfPrev if $mf > 2.0 * $mfPrev ; $mf = 0.5 * $mfPrev if $mf < 0.5 * $mfPrev ;

printf "multiplier_function= %.16g\n", $mf ;

print STDERR "pressure = $p1 mf = $mf\n" if $verbose ;}

Page 123: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 123

Client Server RunClient Server Run

To Run

acuRun

Extract surface integrated fluxes

acuTrans –osi –osiv step,mass_flux,traction \–osis “inflow” –to table

Page 124: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 124

RestartRestart

Simplest way to restart a job:

acuRun –rst Starts from the last available restart run/time-step No modification is accommodated

Requires having restart files on disk, enable through:RESTART_OUTPUT { output_frequency = 100 num_saved_states = 2}

By default restart files are written every 1000 time steps plus the last time step

Page 125: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 125

Restart with ModificationsRestart with Modifications

Restarting a job from a solved problem with modifications requires: Writing a restart input file; such as channel.rst Running acuRun with the restart input file

acuRun -inp channel.rst

Restart file starts with RESTART & ends with RUN:RESTART { }needed modificationsRUN { }

Here the run resumes from the last available restart data

Page 126: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 126

Restart with Modifications (cont)Restart with Modifications (cont)

A problem may be restarted from any available problem, run and time step:

RESTART { from_problem = "channel" from_run = 2 from_time_step = 40}

Any number of commands may be placed between RESTART and RUN to change and/or add new options The only restriction is that the number of nodes may not be

changed

Page 127: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 127

Restart with Modifications (cont)Restart with Modifications (cont)

Example: to run a steady thermal-flow problem in two steps: Step 1:

Write the initial input file with all flow and thermal conditions (equations, staggers, matrial models, BC, etc.)

Solve for all but temperature equation in step 1: e.gTIME_SEQUENCE { ... staggers = { "flow", "turb" }}

Run acuRun with this input file Step 2:

Write a simple restart file, such asRESTART { }TIME_SEQUENCE { staggers = { "temp" }}RUN { }

Run acuRun with this input file

Page 128: ACUSIM Software Inc., 2685 Marine Way, Suite 1215, Mountain View, California 94043 Tel: (650) 988-9700 Fax: (650) 988-9770 info@acusim.com

Page 128

Concluding RemarksConcluding Remarks

AcuSolve is a general purpose incompressible flow solver It can be used to model a wide range of CFD problems Its differentiation is in its superior:

Robustness Speed Accuracy Functionality

For further information on using AcuSolve, consult the manuals AcuSolve Command Reference Manual AcuSolve Programs Reference Manual AcuSolve User-Defined Function Reference Manual