CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ANSYS Meshing & Geometry (https://www.cfd-online.com/Forums/ansys-meshing/)
-   -   Parametric Meshing ICEMCFD (https://www.cfd-online.com/Forums/ansys-meshing/141014-parametric-meshing-icemcfd.html)

kg1913 August 28, 2014 06:00

Parametric Meshing ICEMCFD
 
Hi,

How exactly does parametric meshing differ from normal meshing?

How can I apply that in ICEMCFD?

Thank you :)

Far August 29, 2014 03:14

Yes you can do it.

In ICEM via workbench you just need to define parameter for that particular region of interest and give range and detla for which you want to run simulation.

In ICEM standalone mode you need to use scripting. However, for tetra+prism meshing there is one script written by ANSYS and it is uploaded on the formu, just make a search.

kg1913 August 29, 2014 06:36

1 Attachment(s)
In standalone mode, I can create the script by turning on the recording while doing the steps right? Sorry I am a beginner. Not entirely sure how to do it.

The step is decreased as shown until the the beam closes the hole. How can I apply the parametric meshing in standalone mode? (Hexa Meshing)

bluebase August 29, 2014 07:15

Hi kg1913,

the scripting language of ICEM is a script language called TCL. I would suggest you, to look for a small tutorial of TCL to get an idea how to define variable/parameters and how to do some calculations.
With the recording feature of ICEM you can collect all necessary commands. On that basis you can remove unecessary undo/redo loops and replace the wanted values with your variable.

For an early access:

Code:

# A line beginning with a hash is a comment
# Copy to a tcl shell or the ICEM command window

# Defining a variable:
set variable 12.34

# Some math
expr 1+2/(3*4)

# To use the value of a variable, put a leading $ sign to the variablename
expr $variable+2

# to define a variable with caluculated value
set newvar [expr $variable + 3]

# run the previos "set" command before running the following lines.  ("puts" prints to the shell window. In ICEM, you can also use "ic_mess" instead.)
#  Notice the difference.
puts {Curvy Braces: $variable}
puts "Quotes: $variable"

With regards,
Sebastian

kg1913 September 1, 2014 12:03

Thank you very much. As I think it will take time to learn the language etc, I think it is quicker to do the meshing manually for each set of geometry (due to time limitation). However, this would be a good practice for later. :)

So, I wrote a paragraph about using parametric meshing in my model etc. that I could use this etc... But that is more informative than critical. I would like to write more critically about it in my thesis. What could I discuss/write critically about parametric meshing? (e.g. scripting etc)

Far September 1, 2014 12:34

you can do same using ansys workbench parametric capability without writing script

bluebase September 1, 2014 13:46

To give you some ideas, you might already know...

I think, usually we have to find an efficient way to generate a mesh which satisfys all the requirements (accuray, size, convergence characteristics, available time, documentation, saved files after project finish, and probalby many more).

For a quick test run, or a very complex geometry, an automatic unstructured mesh algorithm can be a good method. And, polyeder meshes seem to gain popularity (haven't tested them yet). But Tetra meshes often have disadvantages regarding mesh size, convergence rate and accuracy.
Generating unstructured mesh sometimes can take a lot of cpu time and memory.

For problems with high requirements on accuracy a structured mesh is often used. It's possible to get a higher convergence rate and accuracy than a tetra mesh of the same size.
The main "issue" with structured mesh is the time one has to invest to create a blocking. This processing time needs to be invested every time you have a new problem. In case of a few similar problems one sometimes can modify the blocking of the first in the problem set to get a good blocking for the rest of the set.

But what if you have hundreds of similar problems? Processing all by hand probably is very cumbersome.

That's where scripting enters the game. You have to invest even more time to write a good script than the time needed for one blocking done by hand. With just a few parameter you can generate big set of similar meshings.

Sometimes, the geometry or mesh needs to be modfied after finishing your first script. That's a problem. It needs time to modify the script, where in ICEM, you might just need a few new splits to get a the next mesh.

Simply spoken, scripting is the least versatile meshing method but the fasted meshing method for a big problem set.

Edit: I don't know if versatile is a good translation of what i mean. i mean not easily modified. although, everything done interactivly can be done via script or recorded.

bluebase September 4, 2014 09:35

Hi kg1913,

by chance i found a method today to define parameters in icem without writing a script.

In the Menu "Info" there is a menu point "Toolbox". It opens a form which includes a calculator and a page where you can define variables by name and value!
It seems it's also possible to perform arithmetic math with other variables to define a new variable.

So... to create a simple parametric mesh as a novice user, you could start a new project, switch on the recording feature and define your variables.
And then do the main work.
Instead of defining a point by an discrete value, you can use a parameter by putting its name into one of the coordinate fields. =)
When finished save your replay script.
For a change of a parameter search in the script for a line similar to "ic_vdefine testname variable 12.34" and change it.

Practically, no scripting done by hand.


With regards,
Sebastian

kg1913 September 5, 2014 05:46

bad quality cells O-grid
 
5 Attachment(s)
Hi, Thank you Sebastian, I will try that out if I have more time. I have done it manually now. But the the thing is, while decreasing the step size from 0.5 to 0.025 between the top plate and the beam, bad quality cells around the )-grid are created. Is there anything I could do to avoid them? (at x= 0.5, the mesh is good). I read some of the threads here(edge alignment and another O-grid etc) but I think the bad cells are created by decreasing of the gap between the two parts.

Thank you. :)


All times are GMT -4. The time now is 22:06.