Monday, December 29, 2014

NX Unigraphics: Tutorials, Guide

Sketching.
http://www.mediafire.com/file/gaww9efzlktc58o/Unigraphics NX8 – Sketching.pdf
Modeling.
http://www.mediafire.com/file/higcwratv2co7cy/Unigraphics NX8 – Modeling.pdf
Associactive Copy.
http://www.mediafire.com/file/r9xmk00i7isk364/Unigraphics NX8 – Associative Copy.pdf
Combine Bodies
http://www.mediafire.com/file/omx1yodw11xytq5/Unigraphics NX8 – Combine bodies.pdf
Design Feature
http://www.mediafire.com/file/pynf7vsonh7uma7/Unigraphics NX8 – Design Feature.rar
Detail Feature
http://www.mediafire.com/file/zygkiv59uov9jrj/Unigraphics NX8 – Detail Feature.pdf
Mesh Surface
http://www.mediafire.com/file/wmzjcu784od3m75/Unigraphics NX8 – Mesh Surface.pdf
Offset, Scale
http://www.mediafire.com/file/kx31rjzqu3b3uj9/Unigraphics NX8 – Offset, Scale.pdf
Surface
http://www.mediafire.com/file/5m9d6j66e7f5yg9/Unigraphics NX8 – Surface.pdf
Sweep
http://www.mediafire.com/file/zkos6sx85jgs4p7/Unigraphics NX8 – Sweep.pdf
Trim Bodies
http://www.mediafire.com/file/5dk1f3vn89vx13y/Unigraphics NX8 – Trim bodies.pdf

Tuesday, December 2, 2014

The Yt project in Python: olumetric Data Analysis, Astrophysical simulation

Yt is an additional python package aiming for Volumetric Data Analysis, An volumetric analysis and visualization toolkit for Astrophysical simulations, handling multi-resolution data from astrophysical simulations, radio telescopes, and a burgeoning interdisciplinary community, etc.

Link: http://yt-project.org/

Tuesday, November 18, 2014

eLearning @ Cerfacs - Online Courses

CERFACS members collaborate to formation in multiple places (engineering schools and universities in Toulouse, Bordeaux and Paris, and specialized schools for PhDs and engineers such as Von Karmann Institut, College de Polytechnique, etc) and on many topics (numerical methods, high-performance computing, fortran, optimization, tutorial for Large Eddy Simulation of reacting flows, theoretical and numerical combustion, Computation Fluid Dynamics on massively parallel architectures, etc).
To ensure that students can have the best access to teaching materials (courses, hands-on exercices, links to various external sources, examples of exams),
CERFACS has gathered data on this website where you can download all data related to the course they are following. You are welcome to use this site.
Link: http://elearning.cerfacs.fr/

Wednesday, November 12, 2014

Free Fire Dynamics Simulator (FDS) and Smokeview

Fire Dynamics Simulator (FDS) is a large-eddy simulation (LES) code for low-speed flows, with an emphasis on smoke and heat transport from fires.
Fire Dynamics Simulator (FDS) is a computational fluid dynamics (CFD) model of fire-driven fluid flow. The software solves numerically a form of the Navier-Stokes equations appropriate for low-speed, thermally-driven flow, with an emphasis on smoke and heat transport from fires.

Smokeview (SMV) is a visualization program used to display the output of FDS and CFAST simulations.

FDS+Evac is the evacuation simulation module for Fire Dynamics Simulator (FDS). The software is used to simulate the movement of people in evacuation situations. The evacuation simulations can be fully coupled with the fire simulations.

These tools are open source and freely available.

Source: https://code.google.com/p/fds-smv/




Tuesday, November 11, 2014

Django

Django is a free and open source web application framework, written in Python, which follows the model–view–controller architectural pattern. It is maintained by the Django Software Foundation (DSF), an independent organization established as a non-profit.

Django's primary goal is to ease the creation of complex, database-driven websites. Django emphasizes reusability and "pluggability" of components, rapid development, and the principle of don't repeat yourself. Python is used throughout, even for settings, files, and data models. Django also provides an optional administrative create, read, update and delete interface that is generated dynamically through introspection and configured via admin models.

Source: www.djangoproject.com

Saturday, November 8, 2014

SU2 Compressible Flow Solver - open source

Stanford University Unstructured (SU2)
Computational analysis tools have revolutionized the way we design aerospace systems, but most established codes are proprietary, unavailable, or prohibitively expensive for many users. The SU2 team is changing this, making computational analysis and design freely available as open-source software and involving everyone in its creation and development. 

Source: http://su2.stanford.edu/

Thursday, November 6, 2014

iFEM, Finite Element, Matlab

iFEM is a MATLAB software package containing robust, efficient, and easy-following codes for the main building blocks of adaptive finite element methods on unstructured simplicial grids in both two and three dimensions. Besides the simplicity and readability, sparse matrixlization, an innovative programming style for MATLAB, is introduced to improve the efficiency. In this novel coding style, the sparse matrix and its operations are used extensively in the data structure and algorithms.

Source: http://www.math.uci.edu/~chenlong/programming.html

Monday, November 3, 2014

1st International Conference in Sports Science & Technology, Hotel Novotel Clarke Quay, Singapore 11 - 12 December 2014

1st International Conference in Sports Science & Technology
Hotel Novotel Clarke Quay, Singapore
11 - 12 December 2014
Annually, millions are spent on engineering and research into various aspects relating to sports. This has inadvertently improved sporting equipment and has resulted in safer practices and enhanced performance. Examples of engineering innovations are evident from sporting activities from motor racing, cycling to tennis and golf. In addition, technology has also been deployed to improve the experience of spectators through the use of wearable cameras and wireless sensors. Papers are invited on various aspects of engineer. The topics include, but not limited to, the following aspects:

Wearable Devices
Motion Capture
Real-time Performance Monitoring
Design and Analysis of Sporting Equipment
Performance Enhancing Clothing
Training Aids
Simulators
Robotics

JOURNAL DETAILS
For all three symposia, selected papers will be considered for publication in a special edition of the Proceedings of the Institution of Mechanical Engineers, Part P: Journal of Sports Engineering and Technology, a publication indexed by the Science Citation Index (SCI).
  • Guest Editors: Dr. Gerald Seet (MAE, NTU), Prof. Sunil Joshi (MAE, NTU), Dr. Govindasamy Balasekaran (PESS, NIE).
For the Advanced Materials symposium, authors with accepted abstracts will be invited to submit a full length paper, to be peer-reviewed and published in a special issue of Materials & Design, an Elsevier journal (SCI) with impact factor of 2.913.
  • Guest Editors: Dr. Aravind Dasari (MSE, NTU), Dr. Weimin Huang (MAE, NTU), Dr. Zhong Chen (MSE, NTU).

Wednesday, October 29, 2014

GrabCAD Workbench: manage and share CAD files

GrabCAD Workbench

The fast, easy way to manage and share CAD files without PDM cost and hassle.
Workbench allows teams on any CAD system to work smoothly together by syncing local CAD files to cloud projects, tracking versions and locking files to prevent conflicts.

Source: http://grabcad.com/

Tuesday, October 28, 2014

OpenMDAO - Multidisciplinary Design Analysis and Optimization

OpenMDAO is an open-source (why?) Multidisciplinary Design Analysis and Optimization (MDAO) framework, written in Python. You can use it to develop an integrated analysis and design environment for your engineering challenges.

In layman’s terms: OpenMDAO is a piece of software that links other pieces of software together. It allows you to combine analysis tools (or design codes) from multiple disciplines, at multiple levels of fidelity, and to manage the interaction between them. OpenMDAO is specifically designed to manage the dataflow (the actual data) and the workflow (what code is run when) in conjunction with optimization algorithms and other advanced solution techniques. OpenMDAO also has extensive optimization capabilities built right in.

Link: http://openmdao.org/

Monday, October 27, 2014

SPEIC14 is the scientific conference on Combustion and related fields, Lisboa, Portugal, November 19 to 21, 2014

Following the very successful SPEIC10 conference on the island of Tenerife (Spain), the SPEIC14 conference will be held at Instituto Superior Técnico, Lisboa, Portugal, from November 19 to 21, 2014.

SPEIC14 is the scientific conference on Combustion and related fields, jointly organized by the Portuguese and Spanish Sections of the Combustion Institute.

The first conference took place in the island of Tenerife (Spain), on 16–18 June 2010. The Conference was attended by around 100 researchers from over 20 countries and 4 continents. It featured 5 Keynote Lectures, and about 70 contributed papers.

The 2014 edition of SPEIC will serve the additional purpose of honoring Professor César Dopazo and his scientific leadership in the fields of Fluid Mechanics, Combustion and Energy

The Conference will address the following topics, with a special emphasis on sustainable combustion:

•         Reaction kinetics, and large-molecule (soot, PAH, dioxines) phenomena

•         Flame theory, experiments and calculations of laminar and turbulent flames, single or multiphase.

•         New diagnostic techniques

•         New computational methods

•         Sustainable combustion: Oxy-combustion, chemical looping, hydrogen and syngas combustion, biomass combustion, mini- and micro-combustors, and other novel combustion processes.

•         Combustion systems: ICE, gas turbines, furnaces

•         The ignition and propagation of fires in the natural and built environments.

Webpage: http://www.speic14.org/

Tuesday, October 21, 2014

Software programmer / engineer

Tasks and responsibilities
  • Software (in-house Scripts/Utilities /tools) development for interaction with Computer-aided engineering (CAE) software
  • Programming in Python and other programming languages
  • Create macros for Microsoft Word and Excel’s template and document
  • Maintain and revise existing application programs
  • Conduct debugging, troubleshooting and problem resolution
  • Conduct program test to ensure that the code/project requirements are met
  • Prepare introductions and guidelines of related application system
Profile
  • Diploma or Bachelor degree in Information Technology/ Computer Science/ Software Engineering 
  • Very fluent in at least one programming language
  • Be able to create macros for Word and Excel document/template 
  • Preferred skill(s): Python (strongly preferred), shell scripting in Linux/Unix, knowledge in Linux/Unix operating system, Java, C/C++
  • Good English communication skills

Monday, October 20, 2014

Install PyDev for Eclipse in Linux

Install PyDev for Eclipse in Linux

Eclipse: Help > Install New Software
  • Work with: PyDev - http://pydev.org/updates
  • Name> Select PyDev
  • Next
  • Select "PyDev for Eclipse"
  • Next
  • I accept terms of the license agreement
  • Finish
Error: ""Installing Software" has encountered a problem. 
An error occurred while collecting items to be installed"

How, Troubleshoot:
- Ubuntu 12.04
- Eclipse Version: 3.7.2

Eclipse: Help > Install New Software
  • Work with: PyDev - http://pydev.org/updates
  • Deselect "Show only the latest versions of available software"
  • Name> Put arrow down PyDev
  • Select "PyDev for Eclipse, 2.8.2"
  • Next
  • Select "PyDev for Eclipse"
  • Next
  • I accept terms of the license agreement
  • Finish


Friday, October 17, 2014

matplotlib: free plotting tool in Linux, (python code) similar Matlab

matplotlib

matplotlib is a pure Python 2D plotting library designed to bring publication quality plotting to Python with a syntax familiar to MATLAB users. All of the plotting commands in the pylab interface can be accessed either via a functional interface familiar to MATLAB users or an object oriented interface familiar to Python users.
The library uses numpy for handling large data sets and supports a variety of output backends including GTK GTKAgg, GTKCairo, FltkAgg, QtAgg, TkAgg and WXAgg.

 Features include:
  • Generate:
    • Plots
    • Histograms
    • Power spectra
    • Bar charts
    • Errorcharts
    • Scatterplots and more
  • Based on Python, a full-featured modern object-oriented programming language suitable for large-scale software development
  • Suitable for fast scripting, including CGI scripts
  • Free, open source, no license servers
  • Native SVG support
Installation guide:

Install in ubuntu/debian:

- sudo apt-get build-dep python-matplotlib 

Install in Fedora/Red Hat:
- su -c "yum-builddep python-matplotlib"

- cd python folder
- python setup.py install

Source: http://matplotlib.org/

Error:
1) install matplotlib python version x.x required, which was not found in the registry.
  -->  Correction: You must install the python version which older or equal to the version of matplotlib.

2) ImportError: No module named matplotlib.pyplot

import six
ImportError: No module named 'six'
 --> Download and install this packages: https://pypi.python.org/pypi/six

ImportError: matplotlib requires dateutil
 --> Install: python-dateutil



Saturday, October 11, 2014

Can't find boot-repair package in Ubuntu

Solution:
 
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sh -c "sed -i 's/trusty/saucy/g' (continue below)
              /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list"
sudo apt-get update
sudo apt-get install -y boot-repair && (boot-repair &)
 
Read more :  link

Monday, October 6, 2014

Solve license server and client problems

By default, the FLEXlm license manager will use random ports chosen whenever it's started. To use a static port number for the communication between Maple and the FLEXlm license manager, the following changes will need to be made:

On the server (maple.lic) – add the static port number to the end of the SERVER line. For example, if you wish to always use port 27000:

SERVER [servername] hostid 27000

On the clients (license.dat) – add the static port number to the end of the SERVER line. In this example, the license.dat file in the Maple license folders would look like:

SERVER [servername] ANY 27000

USE_SERVER

Once a static port number is chosen the firewall can be configured to allow communication on this port.

There is a second port number used on the license server itself for communication between the FLEXlm license manager and the maplelmg vendor daemon. This is not usually an issue, since firewalls typically do not block communication on the local machine. However, if you would like this port number to be static as well, you will need to make the following change on the server only:

On the server (maple.lic) – add the second static port number to the end of the VENDOR line with the port option. For example:

VENDOR maplelmg PORT=27010

The first change will ensure that FLEXlm always uses the same port number to communicate with the Maple installations. The second change will ensure that the same port number is used internally on the license server for the communication between FLEXlm and the vendor daemon. Please ensure that your server's firewall allows connections on these two ports.

add allowed portal in firewall:  edit /etc/sysconfig/iptables
Add following lines to allow <port> in TCP/UDP
-A INPUT -p tcp -m tcp --dport 27000 -j ACCEPT
-A INPUT -p udp -m udp --dport 27000 -j ACCEPT

Friday, October 3, 2014

CAD/FEM modelling Engineer (jr.)


Summary
For our R&D department in Damen Shipyards Singapore, we are searching for a junior FEM modelling Engineer. In this role, you support R&D teams in creating CAD FEM models in Siemens NX.

Tasks and responsibilities

  • Creating FEM models and making FEM analysis (after formal training)

Profile

  • Bachelor degree or Diploma in Engineering, preferably Marine Engineering
  • Singaporean or Singaporean Permanent Resident
  • Good level in spoken and written English
  • CAD skills (able to read technical digital drawings)
  • Accurate
  • Able to work long time with digital modelling

Department Information
The R&D department provides specific technical support for the Product Groups (project proposal and project management departments), Engineering Services and affiliates in the fields of naval and
mechanical engineering. R&D undertakes specific studies for the development of ships by the Product Groups and to expand the knowledge base. This research can be divided into 5 categories, that is to say: Mechanical Systems, Noise & Vibrations, Ship Structures, Hydromechanics, Human Factors and Control systems.

Contact Information
Please send your recent CV by email to:
Jerry Baffa, MSc
Manager R&D Abroad
jerry.baffa@damen.com
www.damen.com



Thursday, October 2, 2014

Ti2015 - 4th International Conference on Turbulence and Interactions

Ti2015 - 4th International Conference on Turbulence and Interactions

Main topics

  •  Fundamental Turbulence, Instability and transition, Multiscale Interactions, wall turbulence
  •  Advanced modeling and simulation methods for turbulent flows
  •  High-speed aerodynamics, aeroacoustics and flow control
  •  Environmental, geophysical and compressible turbulence
  •  Multiphase and reacting Flows, heat transfer, Plasma and MHD turbulence
  •  Complex flows (aeronautics, automotive, biological and medical flows)
  •  High Performance Computing (data analysis, visualisation ...)
May 15, 2015:
Abstracts submission
(for regular paper and poster sessions)
(2 pages, figures included, pdf format only)

June 30, 2015:
Acceptance notification
(for regular paper or poster sessions)

October 23, 2015:
Final papers submission
(for regular paper sessions only)
(7 pages for regular papers; 12 pages for keynote lectures)

Source: http://ti2015.onera.fr/

Wednesday, October 1, 2014

Useful soft for Window



Tuesday, September 9, 2014

Boundary Element Method


Wednesday, September 3, 2014

Flow Vision, CFD multi-purpose simulation

FlowVision CFD system

FlowVision is a new generation multi-purpose simulation system for solving practical CFD (computational fluid dynamics) problems.

The modern C++ implementation offers modularity and flexibility allowing addressing the most complex CFD areas. Unique approach to grid generation (geometry fitted sub-grid resolution) provides natural link with CAD geometry and FE mesh. The Abaqus integration through Multi-Physics (MP) Manager supports the most complex fluid-structure interaction (FSI) simulations (e.g., hydroplaning of automotive tire).

FlowVision integrates 3D partial differential equations (PDE) describing different flows, viz., the mass, momentum (Navier-Stokes), and energy conservation equations. The system of the governing equations is completed by state equations. If the flow is coupled with physical-chemical processes like turbulence, free surface evolution, combustion, etc., the corresponding PDEs are added to the basic equations. All together the PDEs, state equations, and closure correlations (e. g., wall functions) constitute the mathematical model of the flow.

FlowVision is based on the finite-volume approach to discretization of the governing equations. Implicit velocity-pressure split algorithm is used for integration of the Navier-Stokes equations.
FlowVision is integrated CFD software: its pre-processor, solver, and post-processor are combined into one system. A user sets the flow model(s), physical and method parameters, initial and boundary conditions, etc. (pre-processor), performs and controls calculations (solver), and visualizes the results (post-processor) in the same window. Any time he can stop calculations, change the required parameters, and continue or recommence the calculations.

Capvidia/ТЕСИС develops two versions of the software: sequential FlowVision 2.xx.xx and parallel FlowVision 3.xx.xx (or FlowVision-HPC). Both systems employ modern technologies of CFD and computer graphics.

Monday, August 25, 2014

CFD tools for ship/ marine


FINE™/Marinehttp://www.numeca.com/en/products/finetmmarine
is an integrated CFD software environment for the simulation of mono-fluid and multi-fluid flows around any kind of ships, boats or yachts, including various types appendages.

PARNASSOS, Marin, http://www.marin.nl/web/Facilities-Tools/CFD/PARNASSOS.htm
is a dedicated code for computing the steady flow around ship hulls. It is used extensively in practical projects

ReFRESCO, Marin, http://www.marin.nl/web/Facilities-Tools/CFD/ReFRESCO.htm
is a more general code, applicable to steady or unsteady flows and complicated geometries. Simultaneous with a further development of additional features, the method is used in practical projects and Joint-Industry research projects.

v-Shallo, HSVA, http://www.hsva.de/
Features and CFD functionality: HSVA's wave resistance flow code is a fully non-linear, free surface potential CFD code computing the inviscid flow around a ship hull at a free surface. When it comes to CFD functionality, is capable of computing a large number of different flow cases such as:

Boat3D, Planing boat simulation software, http://www.daoftx.com/boatsim.htm

OpenFOAMhttp://www.openfoam.com/
OpenFOAM is a free, open source CFD software package

STAR-CCM+ / STAR-CD

Fluent

Flow3D

FRIENDSHIP-Frameworkhttp://www.friendship-systems.com/products/friendship-framework
We integrate with most of the leading commercial CFD codes as well as in-house codes. Easily plug-in your CFD tool into the environment of FRIENDSHIP-Framework to quickly move forward and concentrate on the next step

CAESES® is the free version of the commercial CFD integration platform FRIENDSHIP-Framework which has been developed for simulation-driven design of flow-exposed surfaces, http://www.friendship-systems.com/products/caeses

Wednesday, August 13, 2014

OpenFOAM for MS windows binary release

This is the OpenFOAM for MS windows binary release project ("openfoam-mswin")

This project is hosted by SourceForge.net. The project team describes it as:

This is the native MS windows release of OpenFOAM, an open source toolbox for Computational Fluid Dynamics (CFD). It was built with MinGW C++ as a set of native windows applications, which improves performance and eliminates the need for Unix emulations.

Source: http://sourceforge.net/projects/openfoam-mswin/

Tuesday, August 12, 2014

Wednesday, August 6, 2014

The International Congress of Mathematicians Seoul, August 13-21, 2014.

The International Congress of Mathematicians (ICM) is the largest congress in the mathematics community. It is held once every four years under the auspices of the International Mathematical Union (IMU). The Fields Medals, the Nevanlinna Prize, the Gauss Prize, and the Chern Medal are awarded during the opening ceremony on the first day of the congress.

Theme of SEOUL ICM 2014 "Dreams and Hopes for Late Starters"

Source: http://www.icm2014.org/en/about/icm2014

Monday, August 4, 2014

Generate Rotor-Stator Type Meshes in snappyHexMesh

Before we delve into detail on how to generate rotor-stator type meshes in snappyHexMesh, I would like to clarify what I mean by that. A rotor-stator setup basically describes a mesh, where a certain region rotates around a given axis and the rest of the domain stays in place. To accomodate such large rotational motions, a sliding interface (AMI/GGI) is to be used, which in turn requires the mesh to be split into two parts.
There is a tutorial in the official release, on how to generate rotor-stator type meshes in snappyHexMesh. This tutorial uses snappyHexMeshonly to generate the mesh in a single run. This method turns out ot be very memory intensive with the mesh increasing in size. Additionally that method is fairly time intensive, when iterating towards a high quality mesh, as the entire mesh has to be kept in memory. Optimizing the rotor part of the propeller mesh is hence even more time intensive, than it is anyway. The method presented in this tutorial helps to circuumvent those memory issues, by generating the rotating and stationary parts of the mesh individually and combining them later on.
ami ggi in multip runs
You might not see this now, but the general geometry is assumed to be a box-like ship, with a rudder attached to it. The rudder has to rotate freely and is hence located in the cylindral zone. As a ship is not very straight forward to mesh at a high mesh quality (in a short period of time, at least), the ship is replaced by a box. Though not being very sophisticated, it serves the purpose of showing how to mesh such things well.
Before we start, the geometry of the rotor (in this case the rudder) should be inspected visually. Special attention must be paid to the edges, extracted from the STL. It is important that all relevant edges are extracted properly. A short overview of how to extract the edges from a STL file and force snappyHexMesh to snap cell edges to geometry feature edges can be found here.
rudder
Screenshot of the rudder geometry
cylinder
Screenshot of the cylinder, used for the interface between the rotating and stationary part of the mesh.

Stator Part

The first step is to generate the stator part of the mesh, which is not going to rotate. For the sake of this tutorial, a block is used as a geometry, that has a cylinder underneath it, which serves as the stator part of the AMI/GGI mesh. This cylinder is empty and will remain so, while generating thestator part of the mesh.
Closeup view on the AMI/GGI interface (cylinder) and the "ship-like' body, the rudder will be attached to.

Closeup view on the AMI/GGI interface (cylinder) and the ship-like body, the rudder will be attached to.

It does not matter what kind of geometry you choose, as long as there is a patch in there, that is suitable to be used with an AMI/GGI interface. The cylinder was created in paraview, triagulated and saved to disk as an ASCII STL. This geometry is then defined in the geometry subdict ofsnappyHexMesh. The relevant parts for this meshing case are the following:
  • Position the locationInMesh as such, that the area around the the cylinder is meshed and any cells inside get removed
  • Set up surfaceFeatureExtract to extract any edges of the cylinder STL file
  • Use the edge snapping feature of snappyHexMesh, in conjunction with theconstant/extendedFeatureEdgeMesh/<your file name>.extendedFeatureEdgeMesh. It is important to create a symlink to <your file name>.eMeshas snappyHexMesh does not read *.extendedFeatureEdgeMesh files.
  • For sake of simplicity, I like to use the overwrite option with snappyHexMesh
  • It is important, that the cylindrically shaped stator patch has its edges aligned properly and is not crucket or something. Otherwise the rotation in the actual simulation will blow up fairly quickly.
Keep in mind, that using the overwrite option with snappyHexMesh will store the final mesh in constant/polyMesh and no time directories will be generated. Therefore before eventually rerunning blockMesh, the constant/polyMesh directory should be cleaned properly, with keeping the blockMeshDict.
The remaining steps are fairly straight forward. Execute blockMesh and snappyHexMesh, iterate to the mesh you desire and that’s it for this step. It is advisable to put up a script that executes all requried steps, including using sed to replace some patch names:
  1. #!/bin/sh
  2. cd ${0%/*} || exit 1
  3. # Source tutorial run functions
  4. . $WM_PROJECT_DIR/bin/tools/RunFunctions
  5. runApplication blockMesh
  6. runApplication surfaceFeatureExtract
  7. runApplication snappyHexMesh -overwrite
  8. sed -i "s/cylinder_ascii/STATOR1/g" constant/polyMesh/boundar

Rotor Part

Compared to the stator mesh, a little bit more effort should be spend on the rotor mesh. Not only the cylinder must remain as symmetrical as possible, the rudder geometry inside should be as nicely discretised as possible. Copy the rudder geometry to constant/triSurface/rudder.stl and either copy or symlink the cylinder to constant/triSurface/cylinder.stl. The blockMeshDict solely needs to consist of a single block, filled with cubic cells. The dimensions must be just as large as the cylinder.
rotor
View of the entire rotor mesh, containing the rudder and the outer boundary, which
represents the cylindrical interface for AMI/GGI


The geometry subdictionary of the snappyHexMeshDict must contain two STL based geometries: the cylinder and the rudder. Again, the surface features must be extracted and used for the meshing process. In order not to miss any steps, a script to execute each step may come in handy:
  1. #!/bin/sh
  2. cd ${0%/*} || exit 1
  3. # Source tutorial run functions
  4. . $WM_PROJECT_DIR/bin/tools/RunFunctions
  5. runApplication blockMesh
  6. runApplication surfaceFeatureExtract
  7. runApplication snappyHexMesh -overwrite
  8. sed -i "s/cylinder_ascii/ROTOR1/g" constant/polyMesh/boundary
  9. sed -i "s/rudder_ascii/RUDDER/g" constant/polyMesh/boundary
  10. sed -i "20,26d" constant/polyMesh/boundary
  11. sed -i "s/^3$/2/g" constant/polyMesh/boundary
It is important to rename the patches to something meaningful as well as to delete the defaultFaces boundary, that does not contain any faces and adjust the length of the boundary list accordingly (to 2). Please not that this all hard coded and special attention needs to be paid, as soon as the mesh topology changes significantely. Especially in terms of number and names of the boundaries.

Combining both Meshes

Combining the two meshes is fairly straight forward. The first step is to copy the stator mesh and delete any obsolete files and dictionaries, such as snappyHexMeshDict, the surfaceFeatureExtractDict and constant/extendedFeatureEdgeMesh. This case now contains solely the stator part. Using mergeMesh, the rotor part is going to be meged into the stator mesh. Unfortunately this results in a single mesh zone, with internal faces, which is not going to work for the simulations. Using topoSet, the faces and cells are split into two different zones, to account for the rotor and stator parts of the mesh.
The main issue with regards to automization of the entire process is that the boundary file in the merged mesh must be extended, as the rotor and stator patches must get a type of cyclicAMI and this requires additional entries to be added. Using sed, this can be automated to some degree, though I haven’t found a way to include proper linebreaks in a sed replacement. Currently this leads to a long line with spaces to seperate the added lines. The script currently looks like the following:

  1. #!/bin/sh
  2. cd ${0%/*} || exit 1 # run from this directory
  3. # Source tutorial run functions
  4. . $WM_PROJECT_DIR/bin/tools/RunFunctions
  5. # Perform the sed action on the boundary file
  6. function fixBoundary {
  7. echo "Fixing Patch $1"
  8. l=`grep -n -E "$1$" constant/polyMesh/boundary | grep -o -E "^[0-9]*"`
  9. echo $l
  10. typeLine=$[$l + 2]
  11. sed -i "${typeLine}s/wall/cyclicAMI/g" constant/polyMesh/boundary
  12. sed -i "${typeLine}a \
  13. inGroups 1(cyclicAMI); \
  14. matchTolerance 1e-4; \
  15. transform noOrdering; \
  16. neighbourPatch $2;" constant/polyMesh/boundary
  17. }
  18. export rotor='../rudder'
  19. export stator='../box'
  20. rm -rf constant/polyMesh
  21. rm log.*
  22. cp -r $stator/constant/polyMesh constant/
  23. cp -r $stator/constant/triSurface constant/
  24. runApplication mergeMeshes -overwrite . $rotor
  25. runApplication topoSet
  26. fixBoundary "ROTOR1" "STATOR1"
  27. fixBoundary "STATOR1" "ROTOR1"
As you can see, topoSet is used as well. Setting up the topoSetDict can be tricky, depending on how acustomed you are with that tool. The trick is to generate two different mesh zones, one for the rotating part and the other one for the static part. The faces of the cylindrical boundary, there should be two almost identical ones, for the rotor and stator boundary, respectively. The topoSetDict looks like the following:
  1. /*--------------------------------*- C++ -*----------------------------------*\
  2. | ========= | |
  3. | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
  4. | \\ / O peration | Version: 2.1.x |
  5. | \\ / A nd | Web: www.OpenFOAM.org |
  6. | \\/ M anipulation | |
  7. \*---------------------------------------------------------------------------*/
  8. FoamFile
  9. {
  10. version 2.0;
  11. format ascii;
  12. class dictionary;
  13. object topoSetDict;
  14. }
  15. // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
  16. actions
  17. (
  18. // Convert stator patch to a faceSet
  19. {
  20. name AMI;
  21. type faceSet;
  22. action new;
  23. source patchToFace;
  24. sourceInfo
  25. {
  26. name "STATOR1";
  27. }
  28. }
  29. // Get all cells in the region representing the rotor
  30. {
  31. name rotor;
  32. type cellSet;
  33. action new;
  34. source regionToCell;
  35. sourceInfo
  36. {
  37. nErode 0;
  38. insidePoints ((-2.0 -0.4 -0.5));
  39. }
  40. }
  41. // Convert cellSet to zone
  42. {
  43. name rotor;
  44. type cellZoneSet;
  45. action new;
  46. source setToCellZone;
  47. sourceInfo
  48. {
  49. set rotor;
  50. }
  51. }
  52. // Get all cells and then get a subset of them, using regionToFace
  53. {
  54. name rotorFace;
  55. type faceSet;
  56. action new;
  57. source boxToFace;
  58. sourceInfo
  59. {
  60. boxes ((-1e5 -1e5 -1e5) (1e5 1e5 1e5));
  61. }
  62. }
  63. {
  64. name rotorFace;
  65. type faceSet;
  66. action subset;
  67. source regionToFace;
  68. sourceInfo
  69. {
  70. set rotorFace;
  71. nearPoint (-2.4 0 -1);
  72. }
  73. }
  74. {
  75. name rotorFace;
  76. type faceZoneSet;
  77. action new;
  78. source setToFaceZone;
  79. sourceInfo
  80. {
  81. faceSet rotorFace;
  82. }
  83. }
  84. );
  85. // ************************************************************************* //
Now it is only a matter of executing each individual meshing script one at a time and combing them in the end, as shown in this section.