You are on page 1of 45

Khamsin

a SketchUp Plugin
for CFD Modeling
Version 0.8

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Revision History:
Date
19/12/11
13/03/12
30/07/12

Reason
Issue
Version 0.7
Version 0.8

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Author
JDC
JDC
JDC

Check
N/A
N/A
N/A

Table of Contents
Introduction..........................................................................................................................................4
Installation Instructions........................................................................................................................5
Requirements...................................................................................................................................5
Third Party Softwares......................................................................................................................5
Windows Installer............................................................................................................................5
Step-By-Step Installation.................................................................................................................6
Environment Settings Utility...........................................................................................................9
User Manual........................................................................................................................................11
Khamsin Tool.................................................................................................................................13
Change Solver................................................................................................................................15
Settings...........................................................................................................................................17
Volume Tool...................................................................................................................................22
Boundary Conditions Tool.............................................................................................................26
Initial Conditions...........................................................................................................................31
Mesh Locate point(s) internal to volume(s)................................................................................31
Monitor Points...............................................................................................................................32
Monitor Forces...............................................................................................................................33
Analysis.........................................................................................................................................34
Analysis Output.............................................................................................................................35
View Residuals..............................................................................................................................36
View Monitors...............................................................................................................................39
Post-processing ParaView...........................................................................................................41
Preferences.....................................................................................................................................42
About.............................................................................................................................................43
Physical Models..................................................................................................................................44
Boundary Conditions.....................................................................................................................44

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Introduction
Khamsin, a SketchUp plugin for Computational Fluid Dynamics (CFD) Modeling, aims to harness
the power of SketchUp to provide a front-end to setup and control fully fledge CFD analysis. The
underlying principles behind Khamsin are:

It aims at being simple to use with limited modelling options no this is not going to have a
list of features that will run pages and pages;
It provides a front-end to open-source or free meshing tool, CFD solver and post-processing
so that one does not have to spend a lot of time to understand their input and output;
It is customisable.

The first release of Khamsin was made in december 2009, followed by a number of release.
Khamsin goal is to provide an attractive alternative to high end CFD general purpose packages for
the building industry.
Khamsin is available as a 30 days free trial license with paid full version.
Our mission statement is:
"Computational Fluid Dynamics is a toolbox for the engineer. Let's customize this toolbox to
provide you with the right tool. And let you deliver the best outcome for the community and
the environment."

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Installation Instructions
Requirements
The requirements are as follows:
Windows XP. Later versions Windows Vista and Windows 7 should be compatible, but have
not been tested;
Google Sketchup 8 (Free) or Google Sketchup Pro 8, which can be downloaded from
http://sketchup.google.com/.

Third Party Softwares


Khamsin would not be able to provide the current functionality without the following third party
softwares:

Open-source software:
Gmsh http://geuz.org/gmsh/
OpenFOAM http://www.openfoam.com/
Dolfyn http://www.dolfyn.net/index_en.html
ParaView http://www.paraview.org/
blueCFD-SingleCore http://code.google.com/p/bluecfd-singlecore/
OpenFVM is no longer supported. Send us an email if you would like OpenFVM
support to be reconsidered.

Commercial software:
blueCFD http://joomla.bluecape.com.pt/index.php?
option=com_content&task=view&id=18&Itemid=30&lang=en#blueCFD
EnSight http://www.ensight.com/ - Due to technical issues Ensight is expected to be
functional in version 0.8 patch 001 onwards, i.e not in the initial release.

Windows Installer
The provided installer will guide through the installation of Khamsin, which can include the
following components:

Khamsin utilities;
Khamsin plugin to Google Sketchup;
Interface plugins to Gmsh and OpenFOAM solvers laplacianFoam, potentialFoam,
simpleFoam and buoyantSimpleFoam, and Dolfyn;
Option to download and install Gmsh;
Option to download and install dolfyn;
Option to download and install bluCFD-singlecore (a Windows port of openFoam);
Option to download and install ParaView.

If Gmsh and OpenFOAM/blueCFD are not installed and found on the installation (or the
environment variable are not appropriately set), the installer will optionally attempt to download
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

these tools and install them. In this process, the installer may also install the 7-zip utility.
At the end of the installation, a Settings utility is automatically started to ensure that environment
variables are correctly set. A reboot is required after running this utility to ensure that the operating
system environment variables is up-to-date.

Step-By-Step Installation
The following screenshots report a step-by-step installation of Khamsin using the Windows
Installer:
1. Windows installer welcome screen:

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

2. The next screen displays the end-user license agreement, that needs to be accepted to
proceed to the next step:

Accept agreement

Proceed to
next screen

3. The next screen displays the installation directory for Khamsin. The SketchUp plugin is
installed in the Google SketchUp plugins installation directory:

Select a different
installation folder
Proceed to
next screen

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

4. The next screen shows the installation components:

Install Khamsin

Untick components
not required
If in doubt tick every boxes

Install plugins to
Khamsin that links with
Third party solver

Install third-party tools


For meshing, solving
And post-processing

Proceed to
next screen

5. The next screen nominates the name of the program shortcut folder:

Proceed to
next screen

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

6. The next screen summarises the components to be installed and require confirmation that
installation is to proceed:

Proceed with
installation

During the installation process, the installer may download and install third party softwares
if the option Download and install third party tool has been selected in step 6. The third
party softwares downloaded depend on the plugins selected for installation.
Once the installation is complete a confirmation screen is displayed that allow for the
execution of the environment setting utility.

Environment Settings Utility


The environment settings utility allows for the setting and testing of the environment variables that
nominate the third party installation directories. This utility is important as it enables Khamsin to
easily locate the third party software and allow for the setting of customised versions. The settings
utility can be started using via the program menu:
Environment Settings
Utility

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Once started the environment settings utility looks as follows:

Current or proposed environment


Variable values

Options to set environment


Variable values

Button(s) to test solvers


and/or utilities

Test report fields.


Summary reports test outcome
as success or failed.

It is intended to be used as follows:


1. Check the environment variable settings in the upper panel and adjust using the drop-down
menu;
2. Test the settings using the test buttons please note that the utility is not accessible while
the testing is taking place. Testing typically last around 3 to 5 minutes;
3. Check that the test reports are successful in the test report output.
When the utility is closed, it may request for a system reboot to ensure that updated environmental
variables are properly updated by the operating system.
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

User Manual
This user manual is an introduction to the underlying principles of the graphical user interface of
Khamsin and its main functionalities. The user manual does not cover all available functionalities,
nor does it cover the underlying physics solved by the Computational Fluid Dynamics solvers or the
numerical methods involved.
Khamsin functionalities are accessible through the following icons created in the Google SketchUp
toolbar:
Display About Information
Activate Khamsin Tool
The left icon activates the Khamsin Tool that represents the entry point for all of Khamsin
functionalities. The right icon opens the About webdialog that also allows for the input of the
username and key.
If the toolbar is not visible, ensure that
1. the plugin is loaded through the SketchUp Preferences dialog box (menu
Window/Preferences); and

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

2. The Khamsin toolbar is ticked:

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Khamsin Tool
The Khamsin Tool is activated by selecting the following toolbar icon:

Once the tool is activated, Khamsin functionalities can be accessed by displaying the context
sensitive menu by right-click in the SketchUp viewport as shown in the figure below. The context
sensitive menu is generated by the solver selected, environment settings and whether analysis files
are available.

Khamsin Tool is activated

Context sensitive menu


shown by right-click

The context sensitive menu entries are typically:


Change solver;
Define with the following submenus:
Settings;
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

Volume;
Boundary Conditions;
Initiation Conditions;
Mesh locate point(s) internal to volume(s);
Monitor Points;
Monitor Forces;
Analysis with the following submenus:
Clear Analysis;
Go (mesh and run) or Continue (Run);
Results with the follwoing submenus:
View Output;
View Residuals;
View Monitors;
ParaView;
EnSight;
Open case folder;
Preferences.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Change Solver
The Change Solver entry is followed by the currently selected solver:

The Change Solver entry opens the following dialog box that can be used to change the solver to be
used for the analysis:

The solvers interface are provided as plugins to Khamsin and can be extended as required. The
supported solvers are as follows:
Dolfyn:
laplacianFoam;
potentialFoam;
simpleFoam; and
bouyantSimpleFoam.
These solvers are developed and supported by third parties independant from Khamsin and Hibou
Scientific Software Pty Ltd. These solvers are available for download from Internet see section
Third Party Softwares, page 5. Khamsin is not linked to these solvers and interacts with them
through ASCII files and command lines.
Tip: The solver to be used by default (i.e the solver that is automatically assigned to a new model)
can be assigned via the Preferences panel. A brief description of the solver is available through the
Preferences panel see section Preferences, page 42 - and the Settings panel see section Settings,
page 17.
Tip: How to decide on which solver to choose?
This is a very difficult question and probably difficult to answer in a first instance. The following
table summarises the features supported by each solver:

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Table 1: List of features for supported solvers.


Analysis Type

simpleFoam

potentialFoam

laplacianFoam

buoyantSimpleFoam

Dolfyn

Analysis

Mesh

Steady-state

Tetrahedral, Tetrahedral
Isothermal laminar
with Boundary Layer,
flow
Polyhedral, Trim and
Isothermal turbulent (kTrim with Boundary
epsilon) flow
Layer

Steady-state

Potential flow

Tetrahedral, Tetrahedral
with Boundary Layer,
Polyhedral, Trim and
Trim with Boundary
Layer

Steady-state
Transient

Thermal

Tetrahedral, Tetrahedral
with Boundary Layer,
Polyhedral, Trim and
Trim with Boundary
Layer

Steady-state

Non-isothermal
laminar and turbulent
flow with or without
gravity

Tetrahedral, Tetrahedral
with Boundary Layer,
Polyhedral, Trim and
Trim with Boundary
Layer

Steady-state

Isothermal laminar
flow
Isothermal turbulent
flow

Tetrahedral using
Gmsh

Once likely solver(s) have been selected based on their features, it is recommended to use the
following process to build knowledge and confidence with the tool(s):
Review and select a well documented case that contains the physics of relevance;
Build an initial coarse model and test the selected solver(s) to assess its(their) behaviour(s);
Refine the model and conduct an analysis for each selected solver and compare the results of
the analysis to ascertain which solver is more adequate in terms of accuracy, speed,
robustness, etc

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Settings
The Settings panel is used to define the analysis general settings, such as solver, physical models
and numerical parameters. The Settings panel is displayed when selecting the Settings menu from
the Khamsin tool:

The panel is case dependant and only the options relevant to the current parameters selection are
displayed. For example, if the solver only support steady-state analysis, the Analysis field will only
show the option Steady-state. The option will be greyed out as there are no other option available. A
screenshot of the Settings panel is shown below:

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

The following fields and action are available in the Settings panel:
Case name: enter the name of scenario being investigated. This name forms the basis of the
case name for the server.
Note: The case name is used by the server with the GUID (see below) to identify the
analysis. If the case name is changed after the analysis has been conducted, the server will
no longer recognise the previously conducted analysis;
GUID (a.k.a Global Unique IDentifier): this is a unique key generated by Google SketchUp
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

when a new model is created. Saving and modifying an existing model does not modify the
GUID. The GUID is also used by the server along with the case name to identify the
analysis;
Sequential/Parallel Analysis: For solvers that supports parallel analysis, this field allows for
the selection of the number of processors to be used to run the analysis. When running a
parallel analysis all processors are started on the local computers i.e. the processing load is
not shared with other computers;
Fluid: Select the appropriate fluid (or solid) from the drop-down menu. Fluid list and
properties are stored in a comma-separated-variable (CSV) file. This file can be edited using
excel or a text file editor to add or remove fluids as required through the Edit
Thermodynamic Data menu entry:

Solver type: Select the type of analysis to be undertaken using the drop-down menu.
Available analysis types differ depending on those supported by the solver (selected in field
Solver). Table 1, page 16, lists the solver type for each supported solver. Solver type can
take the following values:
Thermal: conduct a heat transfer calculation in a solid (no air movement) medium;
Isothermal Flow: conduct a laminar flow analysis without energy equation or
turbulence;
Flow (with energy equation): conduct a laminar flow analysis with energy equation;
Isothermal Turbulent Flow: conduct a turbulent flow analysis without energy
equation;
Turbulent Flow (with energy equation): conduct a turbulent flow analysis with
energy equation.
Use gravity: tick the box to include gravity in the analysis. The gravity vector is defined
along the z-axis (in the downwards direction) with a magnitude of 9.81m/s2.
Reference pressure: value of reference pressure to be used;
Geometry scaling factor: scaling factor to be applied to the SketchUp geometry during the
processing of the geometry for analysis. This scaling factor has been implemented to
circumvent issues with SketchUp not handling geometry with small features;
Mesh Type: Select the mesh type from the following options:
1. Tetrahedral mesh (Delaunay algorithm): Generate a tetrahedral mesh using Gmsh
Delaunay algorithm;
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

2. Tetrahedral mesh (front advance algorithm): Generate a tetrahedral mesh using


Gmsh front advancing algorithm Delaunay algorithm is recommended, but try the
front advancing algorithm if the Delaunay algorithm fails;
3. Tetrahedral mesh with boundary layer(s) (Delaunay alg.): Generate a tetrahedral
mesh using Gmsh Delaunay algorithm. Prisms layers are added at no-slip wall
boundary conditions;
4. Tetrahedral mesh with boundary layer(s) (Front adv alg): Generate a tetrahedral
mesh using Gmsh Front advancing algorithm. Prisms layers are added at no-slip wall
boundary conditions;
5. Polyhedral mesh (Delaunay alg.): Generate a tetrahedral mesh using Gmsh Delaunay
algorithm. A polyhedral mesh is generated using the dual of the tetrahedral mesh;
6. Polyhedral mesh (Front adv alg.): Generate a tetrahedral mesh using Gmsh Front
advancing algorithm. A polyhedral mesh is generated using the dual of the tetrahedral
mesh;
7. Body fitted hexahedral (trim) mesh: Generate a hexahedral dominant mesh using
trimmer meshing algorithm;
8. Body fitted hexahedral (trim) mesh with boundary layer(s): Generate a hexahedral
dominant mesh using trimmer meshing algorithm. Prisms layers are added at no-slip
wall boundary conditions;
Characteristic mesh size: Enter a reference size for the mesh. By default, the characteristic
mesh size is applied on all boundaries. Finer control of the mesh parameters is achieved
through overriding the mesh size on individual boundary condition (see section Error:
Reference source not found, page Error: Reference source not found). Khamsin stores the
Characteristic mesh size and the ratio between the Characteristic mesh size and the
boundary condition mesh size. Consequently, reducing/increasing the Characteristic mesh
size will reduce/increase the mesh size specified on boundary condition.
Tip: Before running an accurate simulation, try running a simulation on a coarse mesh to
ensure that all physical parameters are set correctly. Using Khamsin, this process is very
straightforward:
1. Set the analysis parameters through the settings panel, defining the volume and the
boundary conditions;
2. Set the Characteristic mesh size to a relatively large value to run the analysis on a
coarse mesh;
3. Run the simulation;
4. Based on the coarse mesh analysis, confirm that all analysis parameters are
adequately set;
5. Decrease the Characteristic mesh size to an appropriate value that provides a good
compromise between mesh size and accuracy;
6. Re-run the analysis.
Trim mesh base mesh size: Nominate the mesh size for the hexahedral mesh used as a base
mesh for the trimmer meshing algorithm. This mesh size will correspond to the size of the
largest cells when the Mesh type is set to Body fitted hexahedral (trim) mesh;
Analysis: select analysis time option from:
Steady-state: conduct a steady-state analysis whereby the steady-state solution is
simulated using an appropriate algorithm (under-relaxation, local time-stepping,
physical time-stepping) to either convergence or a limited number of iterations; or
Transient: conduct a transient analysis whereby the solution is simulated for a
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

selected physical time and time-step.


The following parameters depends on the analysis option selected:
Steady-state analysis:
Nb of Iterations: Enter the maximum number of iterations to be simulated.
The simulation end is reached when convergence is reached or when the
maximum number of iterations have been simulated;
Save frequency - every (iterations): Enter the frequency (number of
iterations) at which the solution is stored in file for a steady-state analysis.
For example, if the save frequency is set to 10, the solution will be saved
every 10 iterations;
Transient analysis:
Analysis physical end time (seconds): enter the physical time corresponding
to the end of the simulation. If the physical end time is set to 10 seconds, the
simulation will run to simulate a physical time of 10 seconds;
Analysis physical timestep (seconds): enter the physical time-step to be used
during the simulation. Khamsin supports a constant time-step only;
Transient > Save frequency - every (seconds): enter a frequency at which the
solution will be saved and stored. If the save frequency is set to 1 second,
intermediate solutions will be saved and stored every 1 second.
Tip: Employ the Estimate time-step/end time as a starting guess for the
analysis physical end time and time-step. The end time and time-step are
estimated on the basis of the boundary conditions, mesh, geometry and
problem settings. The time-step is based on the Courant number, and the endtime is based on the geometry size.
Tip: For transient analysis, ensure that you have adequate disk space
available on the server to store all intermediate solutions.
Delete intermediate solutions: Tick if you wish to delete intermediate solutions. Otherwise
intermediate solutions will be kept, which can place a heavy burden on storage resources;
Use swak4Foam/GroovyBC: Tick this option if you would like to use algebraic expressions
in the definition of boundary conditions (inlet and walls). This option is implemented for
openFoam based solvers using the swak4Foam library see
http://openfoamwiki.net/index.php/Contrib/swak4Foam and
http://openfoamwiki.net/index.php/Contrib_groovyBC for more information. The option
only appears if the libraries swak4Foam/GroovyBC are installed. These libraries are
installed in the blueCFD distribution but are not available in the free distribution blueCFDSingleCore. Contact blueCAPE for more information on the blueCFD distribution.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Volume Tool
The Volume Tool is activated by selecting the Volume from the Khamsin Tool menu:

The Volume Tool allows for the definition of the computational volume envelope. The
computational volume envelope is a set of surface that forms a close shell within which the
computation is to be undertaken to predict the airflow patterns. Typically, the computational
envelope may include an external shell that represents the external limits of the computational
domain and internal shell(s) that represents obstacles within the computational domains, such as a
car, airplane. When modeling a room with no internal obstruction, only an external shell will be
required.
The Volume Tool requires the users to select/tag all the surfaces that represents the external and
internal shells. The tool uses name to identify computational volume, i.e all the surfaces that have
been tag with the same name defines the envelope of this domain.
Note: It is possible to select/tag surface, groups or components. It is also possible to only tag
specific surfaces of a given group or component provided that the containing group or component
is not tagged itself.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

When the Define Volume Tool is activated, the tool creates a menu when the user left click when the
mouse is over a surface or component:
Define Volume Tool
menu
Displayed on left-click

Volume name for


selected surface (red)

The Define Volume Tool menu operates on the following basis:


1. Over the mouse of the surface of interest;
2. Press and maintain pressed the left mouse button;
3. Move the mouse cursor over the menu entry to be selected menu entries are highlighted in
blue;
4. Release the left mouse button when the cursor is over the menu entry to be selected.
The menu has the following permanent options:
New Volume: Create and assign a new volume name to the currently selected surface. The
volume name is constructed as Volume iwhere i is an integer selected to ensure that the
volume name is unique;
Propagate: Select to propagate the volume name(s) assigned to the selected surface to all
uniquely connected adjoining surfaces. Uniquely connected adjoining surfaces are defined
as faces that share an edge with no more than 2 surfaces. The surface name propagation may
overwrite previously defined volume name. In such situation a dialog box will be open that
will notify the user of the overwritten volume name(s).
Check: Perform a check on the volume definition to ensure that all volumes forms close
shell. A satisfactory check will be reported as shown below but the checking algorithm
requires improvement:

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Color by Volume: Select this option to alter the model material to color surfaces according to
the volume to which they have been tagged. The following screenshot shows the model
colored by volume:
Volume color legend
Colors can be changed
Using Preferences menu option

Visual inspection of model


to assist with finding missing
surfaces.

When the Color by Volume option is selected, the menu entry is changed to Restore Model
Materials that can be used to restore the model materials. Model materials are also restored
when the tool is closed or deselected.
Tip: If the model has a large number of surfaces, it is preferable to group surfaces into
groups. Affect volumes to the group prior to turning on Color by Volume option as this
option can take a long time.
The Preferences menu option display a dialog box, shown below, allowing for the selection
of colors to identify volumes.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Close: Close the tool, which resumes the Khamsin tool.


The Define Volume Tool also includes the list of currently defined volumes, with the volumes
assigned to the selected face, group or component highlighted in red:

Current volume name


assigned to the face (red)
Currently defined
volumes

Additional volume name


to be assigned to the
face (blue)

Note: It is possible to assign up to 2 volume name(s) to a single face. This would reflect a thin wall
or an interface between domains. However, the use of multiple volumes within one analysis has not
been tested, and is likely to not be supported by the third party meshing tool and/or solver and is
therefore not recommended.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Boundary Conditions Tool


The Boundary Conditions Tool is activated by selecting Boundary Conditions from the Khamsin
Tool menu:

The Boundary Conditions Tool allows for the definition of the boundary condition types and
parameters, including name, velocity, temperature, pressure and mesh size. Boundary conditions
parameters are specified on surfaces that forms part of the definition of a volume see section
Volume Tool, page 22.
Different solvers support different boundary type, for example the solver laplacianFoam does not
support inlet and outlet boundary types. The boundary types displayed by the Boundary Conditions
Tool are based on the boundary types supported by the solver selected for the analysis and may
differ from the sample shown in this manua
In Khamsin, boundary conditions are applied to surfaces, group and component(s). The boundary
conditions parameters are attached and stored in surfaces, group and component dictionaries. To
change boundary conditions, start the Boundary Conditions Tool, select a surface, a group or a
component in SketchUp, and then change the boundary condition parameters as described herein.
Note: Boundary conditions can be set on individual surfaces, groups or components that form parts
of the definition of a volume.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

When the Define Boundary Conditions Tool is activated, the tool create a menu when the user press
the left mouse button when the cursor is over a surface. The menu is divided into 2 sections, the
first section relates to specification of boundary condition types (inlet, outlet, wall, symmetry and is
solver dependent) and the second section relates to the behavior of the tool.

Boundary Types

Define Boundary
Conditions Tool menu

Tool Behaviours

The highlighted red entry corresponds to the current type of the selected face. The boundary
condition type can be changed by releasing the left mouse button when the cursor is over the
desired boundary type. The process can be summarised as follows:
1. Position mouse cursor over the surface where the boundary conditions are to be specified;
2. Press the left mouse button to display the menu;
3. Move the mouse while maintaining the left button pressed so that the cursor is over the new
boundary condition type as shown below:
Current boundary
condition type (red)
New boundary
Condition type (blue)

4. Release the left mouse button.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

The boundary condition parameters can be specified by double clicking (left button) on the surface
where the boundary conditions are specified. This action opens the following dialog box:

The boundary condition dialog box displays a number of fields that are relevant to the boundary
condition type and the solver. The following list reports a number of typical fields that may be
requested:
Name: store the name of the boundary condition. This name is for the users' ease of use and
does not affect the simulation. Boundary name should consists of alpha numeric characters
and blank spaces only;
Display Name: show the name of the boundary condition as it will be known in the analysis
process;
The following parameters are physical parameters appropriate for the description of the
boundary condition:

x-velocity: specify the velocity in the x-direction (red axis in Google SketchUp);
y-velocity: specify the velocity in the y-direction (green axis in Google SketchUp);
z-velocity: specify the velocity in the z-direction (blue axis in Google SketchUp);
Pressure: specify the pressure (Pascal) at the boundary condition. The pressure is
specified relative to the atmospheric pressure, taken as 1e5 Pa;
Temperature: specify the temperature (in degree Celsius) at the boundary condition.
Note: all parameters are not used for all boundary condition. For example, the
pressure entry is not used for inlet and wall boundary conditions; the U, V and W
velocities are not used at outlet boundary conditions.

Mesh size: specify the mesh size to be applied at the boundary condition.
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

Note: The mesh size is stored relative to the characteristic mesh size specified in the
Settings panel, thereby enabling a single parameter, the Characteristic mesh size, to be used
to uniformly refined or coarsen the mesh as described in section Settings, page 17.
Tip: If using algebraic expressions using groovyBC for inlet or wall boundary conditions, please
contact us or website to be provided with groovyBC factsheet;
Tip: If several surfaces are sharing the same boundary condition type and parameters, you can use
the following procedure:
1. Press (and maintained pressed) the keyboard Ctrl key;
2. Left click on all the surfaces to be specified press Ctrl+Shift and left click on surface
to remove surface from the selection set;
3. Once all surfaces have been selected, double click (left button) on one of the selected
surface;
4. Release the Ctrl key when the boundary properties dialog box is displayed.
If multiple surfaces have been selected with different boundary condition types or parameters, the
differing field will display <differs> to indicate that the field value is not the same across all the
selected surfaces/group/components.
Tip: Do you want an even faster way to specify boundary condition parameters?
Use the measurement VCB to enter the boundary condition parameters:
1. Press (and maintained pressed) the Ctrl key;
2. Select surface(s) where the boundary condition parameters are to be specified;
3. Release the Ctrl key;
4. Enter the conditions parameters in the order requested. In the following example, the order
is set as x-velocity (aka U), y-velocity, z-velocity and mesh size:

Visual Control Box (VCB)

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

The Define Boundary Condition Tool menu option Color by Type can be used to color the specified
surfaces by their boundary condition types as shown in the screenshot below:
Color legend

Wall
Symmetry

Inlet

Wall (slip)

The model colors are automatically restored when the Define Boundary Conditions Tool is
deselected, or the menu option Restore Model Materials is selected.
The boundary condition type colors can be changed using the menu option Preferences. Changes in
boundary condition type colors are stored between SketchUp sessions and models.
The Define Boundary Conditions Tool can be deselected using the menu option Close or selecting a
different tool.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Initial Conditions

Mesh Locate point(s) internal to volume(s)

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Monitor Points

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Monitor Forces

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Analysis
The CFD analysis is prepared and conducted on the server. The following menu entries are
available in the Khamsin tool to clear, create, and monitor the analysis:

Each entries are descibed below:


Clear Analysis: This option clears the analysis files stored in the case directory. This option
should be run if a previous analysis has been undertaken and the analysis parameters have
changed. Otherwise the analysis will be restarted (i.e continued) from the previously
generated setup;
Go (mesh and Run):This option writes the required input files and script files in the case
directory. Prior to starting the analysis, a dialog box is displayed to confirm whether the
analysis is to be started see sample below:

Continue (Run): This option writes required input files and script files in the case directory.
The analysis is started from the existing solution in the case directory. Prior to starting the
analysis, a dialog box is displayed to confirm whether the analysis is to be started see
sample below:

The analysis is started after selecting "Yes". If selecting "No", the input and script files are
available in the case directory the case directory path is shown in the dialog and accessible
via the Open case folder option of the Khamsin Tool.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Analysis Output
After the analysis has started the Khamsin Tool context menu includes a Results menu, which
activates tools to analyse the analysis. The View Output option, shown below, loads the analysis
output:

This option query the analysis output from the third party meshing software, utilities and solver.
The analysis status is then displayed as a text file using the default text editor as shown below:

This option can be used during the analysis to allows for on-going monitoring the analysis progress
and early identification of problems.
The output are generated by the mesh generation software, utilities and solver and can be difficult to
read at first. However these outputs are also a reliable source of information on the bottlenecks and
problems.
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

View Residuals
The View Residuals option is selected as follows:

The View Residuals option query the residuals from the case directory. The residuals indicates the
level of convergence of the solution and are only available for steady-state analysis. Once the
analysis information has been processed, the residuals are displayed in either a space separated text
file or a graph. The following screenshot shows the residual displayed as a space separated text file:

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

If gnuplot is installed and recognised by Khamsin, the residuals are displayed using a graph as
shown below:

Select variables
to display

Regenerate graph with


updated values (if viewing
residuals during analysis)
Open residuals space
separated residual using
text file editor

Residuals Legend

Graph displaying
Residuals (generated
using Gnuplot)

Note: If selecting Residuals fails to open the test editor, check the file association to ensure
that an appropriate software is associated with the extension.
Tip: If gnuplot is not installed or recognised, display the evolution of the residuals to assess
convergence using a spreadsheet editor. Use a logarithm scale for the residual (y) value. For
commercial application, convergence of residual between 1e-3 and 1e-5 is considered good
practice. However convergence assessment should also employ monitoring evolution of
quantities of interest such as flow rate, temperature or velocity at given location.
Tip: What do you do if residuals blow-up/increase?
In most cases, residuals blow-up reflects incorrect or unphysical problem definition. An
example would be a scenario where only inlets are defined with fluid going in and no outlet
is defined. These problems can be easily identified by checking the solution after a small
number of time-steps/iterations.
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

In other cases, the mesh may be the source of the residuals blow-up. In such case, a close
inspection of the mesh combined with a mesh quality check (this is done automatically for
the openFoam based solver and reported in the Analysis Status), can help assist in trouble
shooting the mesh. Once the problematic area is identified a local or global mesh refinement
strategy can be tried.
Analysis trouble shooting is usually a very time consumming process. Experience in
Computational Fluid Dynamics and experience of the specific selected solver will greatly
assist and reduce the requirements for analysis trouble shooting. Khamsin has been designed
to implement robust algorithm to reduce the requirements for analysis trouble shooting, but
there will be instance where trouble-shooting is required.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

View Monitors
The View Monitor option is selected as follows:

The View Monitor allows for the viewing and display of the field values at the monitor point
location nominated in the Monitor Points Tool, see section Monitor Points, page 32. If gnuplot is
not installed or has not been recognised, the monitor point values are displayed as a text file as
shown below:

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

If gnuplot is installed and recognised, the monitor point values are shown in the Monitor Point
Panel shown below:
Select monitor point(s)
to display

Click Reload to reload the


monitor point(s) graph
when the analysis is running

Select variable(s)
to display

Click to view the data


as a text file

Graph viewer area


Graph is generated by gnuplot

Note: If selecting View Monitors fails to open the text editor, check the file association to
ensure that an appropriate software is associated with the extension.
Tip: If gnuplot is not installed or recognised, display the evolution of the monitor points
using a spreadsheet editor.
Tip: Use the monitor points in conjonction with the residuals to assess convergence, which
is only obtained once the residuals and monitor points values have stabilised.
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

Post-processing ParaView
Start the third-party ParaView post-processing utility by selecting the Paraview entry:

The ParaView utility will be automatically started in either of the following mode:
1. If there is a pvsm or py file exists in the same directory as the SketchUp file and with the
same rootname (i.e assuming that the SketchUp file is called case.skp, we are referring to
either case.pvsm or case.py), then ParaView is started with a command to load the pvsm or
py file located in the directory.
This approach is designed allows for the user to save the ParaView state file in the same
directory as the SketchUp file and using the same root name and have the saved file
automatically loaded when ParaView is launched;
2. If not pvsm or py file is found, ParaView is launched with the appropriate command to
automatically load the case from the case directory.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

Preferences
The Preferences panel, shown below, allows for the adjustment of user preferences:

Default solver,
including solver
description

User defined
analysis directory

The following fields are available:


Default Solver: Specify the default solver to be used when a new scenario is being created.
The selected solver description is provided for the user information along with the path to
the third party utilities appropriate for this solver. The available solvers are based on
installed plugins, discussed in more details in section Change Solver, page 15;
Analysis Directory: Define the path to the root analysis directory where all analysis files will
be writen in sub-directories. If the directory does not exist it will be created. The
recommended practice is to set this directory to a sub-directory of the temporary directory.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

About
The About webdialog is shown when clicking on the following icon:

The About webdialog is shown below:

Link to license terms

Link to website

Link to online form


to request trial license

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

License details:
- Username of your choice;
- Key issued by Hibou Scientific
Software Pty Ltd;
- License Type (trial, full, or expired).

Physical Models
Boundary Conditions
The following list reports the boundary conditions implemented in Khamsin and their intended use:

inlet: Nominate a velocity vector and temperature at a boundary condition. Pressure is


calcualted as a zero gradient. This can be used where the fluid enters the domain and the
conditions are know or at an outlet where the air is sucked out of the domain;

inlet (ABL): Nominate an atmospheric boundary layer profile. It is to be used in wind study,
pedestrian comfort studies. This boundary condition will be deprecated to be replaced with
inlet (groovyBC);

inlet (groovyBC): Use the groovyBC library to nominate values or gradient of velocities,
pressure and temperature using algebraic expression. This boundary condition is very very
flexible and can be used for a large number of applications, including nominating a fully
developed boundary layer profile;

inlet/outlet: Nominate a velocity profile where the fluid is entering the computational
domain and a fixed pressure value where the fluid is leaving the computation domain. It is
typically used at external boundaries when simulating the airflow around an object under
varying airflow incoming directions (i.e simulating the wind over a region for various
incoming wind directions). It is recommended to apply a small velocity corresponding to the
dominant airflow direction as an initial condition to ensure that regions where the fluid is
entering or leaving the domain are defined at the beginning of the simulation;

outlet: Nominates region where the pressure is known (typically where the flow leaves the
domain). The air velocity at the boundary is calculated based on the pressure gradient at the
boundary;

outlet-no backflow: Nominates a region where the fluid is leaving the domain and the
pressure is nominated. The flow is prevented from re-entering the domain;

wall: Nominate a no-slip wall boundary condition where the wall velocity and temperature
can be specified. During turbulent airflow simulation, a turbulent wall function is applied at
these boundary conditions;

wall (groovyBC): Nominates a no-slip wall boundary condition where algebraic expression
can be used to specify the wall velocity and temperature using groovyBC. This boundary
condition is used to specify the rotation of wheel in the simulation of a kart for example;

symetry: Nominates a symetry boundary condition;

wall (slip): Nominates a slip wall boundary condition, where the wall does not exerce any
action on the fluid;
Copyright (C) 2011 Hibou Scientific Software Pty Ltd
KHA-UG-08(A)
30/07/2012

wall adiabatic: Nominate a no-slip wall boundary condition where wall velocity can be
specified. The wall temperature is taken as being equal to the adjacent fluid temperature.

Copyright (C) 2011 Hibou Scientific Software Pty Ltd


KHA-UG-08(A)
30/07/2012

You might also like