[phpBB Debug] PHP Notice: in file /viewtopic.php on line 943: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 943: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead
Dolfyn • View topic - Gmsh tutorial 7
dolfyn icon
www.dolfyn.net
Forum

   Home    Examples     About
   Downloads    Installation     Orka    Gmsh    FAQ    Forum  
It is currently Thu Sep 09, 2010 1:08 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Gmsh tutorial 7
PostPosted: Tue Feb 02, 2010 5:20 pm 
Offline

Joined: Tue Feb 02, 2010 5:11 pm
Posts: 3
Hello!

I've been able to setup dolfyn and run all the other tutorials Ok, but the last tutorial with the .stl man always diverges. I'm running gmsh 2.3.1, preprocessor_jan2009 and dolfyn_jan2009b and I use gmsh2dolfyn to convert everything. I also made a .stl mock-up of a car in place of the man, but the situation remains the same. The divergence takes place usually after 4 to 12 iterations.

I'm also using Paraview, and the whole orchestration on Windows platform.



Thanks!

-pm


Top
 Profile E-mail  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Sat Feb 06, 2010 10:39 am 
Offline
Site Admin
User avatar

Joined: Fri Dec 17, 2004 5:37 pm
Posts: 350
Location: Waalre
Hi pamakela,

sorry for not responding earlier (I have been a bit busy).

Nice to know that all ingredients (gmsh, dolfyn and paraview) run on your platform. You obviously did not ran into the (slight) troubles related to the newer version of gmsh (the file format changed slightly). So only the stl-man is cumbersome. Please note that by design gmsh produces every run a different mesh (some randomness is built in); this means that an (occasional) awkward cell might be produced. Next what might help is to note that the scaling factor in the tutorial is set to 0.1. Finally, without knowing how your *.din file looks like, some suggestions you might check:

- If turbulence is switched on, switch it off (in troublesome cases switching turbulence on normally does not improve the behaviour)

- Start with only the 1st order upwind scheme (UD); in the case of the tutorial comment out (with '#') this line: #scheme UVW GAMMA
switch to your scheme of choice later (using restart)

- Check underrelaxation and relax further if necessary: relax 0.4 0.1 0.4 0.8

- With bad cells and awkwardly starting nonlinear equation behaviour the idea is that when a code stumbles severely it cannot recover from it and diverges instead of converges. try using the limiters:
limit uvw lower -10.0
limit uvw upper 10.0
(I'not sure they are in the January 2009 version yet)

- One can increase the laminar viscosity (to 0.001?) and lower it later

- Damping can also achieved by the slope limiters: change the face based limiter to the cell limiter:
slope UVW vnc

- Assure yourself that the pressure reference cell is in a spot where the pressure does not change much (far away from the man) this should not be the trick but should help a bit

- Note that density and the density in the inlet should be the same (for now)

The idea is to get dolfyn started and later switching to higher order differencing schemes etcetera.

Hope one or more ideas help :-)
Enjoy!


Top
 Profile  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Tue Feb 23, 2010 2:20 pm 
Offline

Joined: Tue Feb 02, 2010 5:11 pm
Posts: 3
Hello!


Thank you for the reply. I was able to make the 'mand' case run up to 40 iterations before diverging with some of these improvements suggested. I'd still like to try those slope limiters, but where in the .din file are you supposed to define them? I tried many times, but get *** Errors and/or warnings in input deck.

My din file looks like this (maybe you can edit this and show where the limit UVW lines will go?):

Code:
title Test Gmsh man model
steps 200 1.e-5

opendx off
#use gmsh
use vtk
save cpu 1 h
output every 25


density,1.0
vislam 18.6e-6
pref,65275

# pref is some corner cell ID in my case

relax 0.4 0.1 0.4 0.8
#turbulence ke 0.001
#thermal on
init,field,0.0 0.0 -0.1,,1.e-4,1e-4

# scheme UVW  GAMMA

slope UVW  vnc
slope P    vnf
slope KEPS vnf

post p    vert

boundary,man
wall
noslip               
0.0 0.0 0.0         
fixed       
273 + 38 0.0

boundary,inlet
inlet
0.0 0.0 -1.0
1.0
293
inle
0.25 0.01

boundary,outlet
outlet
1.0

boundary,floor
symp

boundary,walls
symp




Thanks for the suggestions!




Regards,

-PM


Top
 Profile E-mail  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Tue Feb 23, 2010 11:22 pm 
Offline
Site Admin
User avatar

Joined: Fri Dec 17, 2004 5:37 pm
Posts: 350
Location: Waalre
Mea culpa, mea culpa, mea maxima culpa,

Intrigued I ran the case again and indeed divergence (almost immediately). After playing with the *.din file settings a bit suddenly I remembered a (necessary) Gmsh option! The tetrahedral mesh it produces with "-3" is a dirty tet mesh; this means that awkward tets may be contained. Gmsh has to optimize the mesh. Two options are available: -optimize and -optimize_netgen.

So please use one of the two:

Code:
$ gmsh -3 -optimize_netgen man.geo
Info    : Running 'gmsh -3 -optimize_netgen man.geo'
Info    : Started on Tue Feb 23 22:24:57 2010
Info    : Reading 'man.geo'
Info    : Reading 'man_model.stl'
Info    : 13898 facets in solid 0
Info    : Read 'man_model.stl'
Info    : Read 'man.geo'
Info    : Meshing 1D...
Info    : Meshing curve 1 (Line)
Info    : Meshing curve 2 (Line)
Info    : Meshing curve 3 (Line)
Info    : Meshing curve 4 (Line)

...

Info    : Meshing 3D...
Info    : Meshing volume 1 (Delaunay)
Info    : Meshing volume 2 (Delaunay)
Constructing Delaunay tetrahedralization.
Delaunay seconds:  0.59
Creating surface mesh.
Perturbing vertices.
Delaunizing segments.
Constraining facets.
Segment and facet seconds:  0.8
Removing unwanted tetrahedra.
Hole seconds:  0.01
Repairing mesh.
Repair seconds:  0.02

Writing nodes.
Writing elements.
Writing faces.
Writing edges.

Output seconds:  0.01
Total running seconds:  1.43

Statistics:

  Input points: 8288
  Input facets: 16568
  Input segments: 24852
  Input holes: 0
  Input regions: 0

  Mesh points: 12838
  Mesh tetrahedra: 80340
  Mesh triangles: 162015
  Mesh subfaces: 25668
  Mesh subsegments: 25547

Info    : 12838 points 25547 edges and 25668 faces in the final mesh
Info    : 12838 points created -- Worst tet radius is 302.436
Info    : 12839 points created -- Worst tet radius is 19.1171
Info    : 12841 points created -- Worst tet radius is 11.0976

...

Info    : SwapImprove2 
Info    : 2 swaps performed
Info    : ImproveMesh
Info    : Total badness = 314148
Info    : Total badness = 312526
Info    : Mesh 3D optimization with Netgen complete (45.31 s)
Info    : 45132 vertices 255122 elements
Info    : Writing 'man.msh'
Info    : Wrote 'man.msh'
Info    : Stopped on Tue Feb 23 22:25:52 2010
$


In the *.din file I would only deactivate "slope P vnf" later. O I just saw another omission: it should read "scheme UVW GAMMA 1.0" (perhaps starting with a lower value than 1.0).

Somehow I forgot. Sorry.

The tutorial has been adapted accordingly. Thanks!

Enjoy!


Top
 Profile  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Wed Feb 24, 2010 1:03 pm 
Offline

Joined: Tue Feb 02, 2010 5:11 pm
Posts: 3
Hi again,


thanks for the revised tutorial, it works Ok now! Although my version of Dolfyn jan2009b still gives error about those two limit uvw statements, the simulation worked out. Here is Paraview visualisation: http://lipas.uwasa.fi/~n77624/flowtesti2.jpg




Regards,

- PM


Top
 Profile E-mail  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Thu May 20, 2010 5:44 am 
Offline

Joined: Sat Apr 10, 2010 12:17 pm
Posts: 10
Hi,

I just tried this demo and got the VTK result. But don't know how to draw the streamlines in ParaView.

In the DIN file, only "post p vert" is used, so I thought I may need to output the velocity.

Also I am interested in replace the man model with other stl file but found hard to build the bund box. So I wrote a vba program to get the max and min of x,y and z in a STL file, then generate the GEO file automatically in the program. It works now. I'll try some models later.

Regards,

Cean


Top
 Profile E-mail  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Thu May 20, 2010 6:31 am 
Offline
Site Admin
User avatar

Joined: Fri Dec 17, 2004 5:37 pm
Posts: 350
Location: Waalre
Hi Cean,

Great and nice to know that you are getting along :-)

The "post p vert" command is outputing pressure on the nodes or vertices (using the gradients as calculated by dolfyn). For streamlines in ParaView you need the velocity components on the nodes; you can do that either in ParaView by converting/filtering cell data into node data, or output directly the velocities on the nodes by using "post u vert" (all three components will be written). Then the next step would be the streamline filter.

Hope this helps.
Henk

ps: The streamline, or particle, option in dolfyn itself needs to be rewritten as it does not work reliably with full tet meshes. Besides that the ParaView and VisIt filters/modules are much easier to work with.


Top
 Profile  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Tue Jun 15, 2010 8:12 am 
Offline

Joined: Fri Mar 05, 2010 6:08 am
Posts: 17
Dear Dolfyn Friend,


I have tried to run Gmsh tutoriasl7(Man model) within MS Window.

Dolfyn version is 2009Apr version compiled with Visual Fortran 6.6.

It is OK to run Dolfin_2009Apr.exe.
Output of VTK and Gmsh is generated every 25 Steps.

I tried to see the Post file such as Velocity and Pressure using Paraview.

But , Only Outer surface mesh is viewed in Paraview when I tried to see the pressure .

So, I suspect that Paraview can not read Tetra mesh data.

The mesh for fluid part is not viewed within Paraview

I have 2 Questions.


No1.

How can I visualize the color pressure contor( especialy, Man's surface pressure)

No2.

How Can I visualize the color velocity vector ?

I tried to see the verocity vector by the Glyph comand.

But Only gray velocity vector is displayed.

Regards,


Top
 Profile E-mail  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Wed Jun 16, 2010 8:13 pm 
Offline
Site Admin
User avatar

Joined: Fri Dec 17, 2004 5:37 pm
Posts: 350
Location: Waalre
yoshi wrote:
So, I suspect that Paraview can not read Tetra mesh data.

Sorry but this is not correct.

yoshi wrote:
No1. How can I visualize the color pressure contor( especialy, Man's surface pressure)

Please have a look at the type_id's: the first type_id(s) are the volume/fluid cell type(s), followed by the default region (0, zero) and the other boundary regions. You can use the threshold operator to pull out the wall cells only.

yoshi wrote:
No2. How Can I visualize the color velocity vector ?

Velocity vectors only work well on nodes within ParaView. Use the operator cell data to node data first.

Hope this helps.
Enjoy!


Top
 Profile  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Thu Jun 17, 2010 7:58 am 
Offline

Joined: Fri Mar 05, 2010 6:08 am
Posts: 17
Dear Henk,

Thank you for your help.

I could see the veocity vector and stream tracer line in Paraview by teh Cell data to Point and
Glyph.

But I could not see the pressure color contor on the Man's surface.

I can not understand the usage of type_id.

There are 1 -8 type_id on teh Man model.


I waqnt to get the pressure color shading on the Man's skin.

Please tell me again in more detailed operation step by step ?



Regards,


Top
 Profile E-mail  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Thu Jun 17, 2010 2:25 pm 
Offline
Site Admin
User avatar

Joined: Fri Dec 17, 2004 5:37 pm
Posts: 350
Location: Waalre
Dear Yoshi,

the concept of type_id's is important... the *.geo file says:
Code:
...
Physical Volume("Fluid") = {2};

Physical Surface("Man ") = {1};
Physical Surface("Floor") = {2};
Physical Surface("Inlet") = {13};
Physical Surface("Outlet") = {21};
Physical Surface("Walls") = {17, 25, 26};
...


When running the preprocessor you should see something like:
Code:
...
Region ID: 2 => Man
Region ID: 3 => Floor
Region ID: 4 => Inlet
Region ID: 5 => Outlet
Region ID: 6 => Walls
...


This will give the following type_id's:

1 => fluid cells
2 => (empty as there are no undefined, region 0, boundaries)
3 => (empty, unused)
4 => Region 2 => Man
5 => Region 3 => Floor
6 => Region 4 => Inlet
7 => Region 5 => Outlet
8 => Region 6 => Walls

Note the order has not changed. So when you select in the Threshold filter type_id == 4 then you should see your man. The nicest pressure picture is when you saved the pressure as nodal data as well with "post p vert".

Have fun!


Top
 Profile  
 
 Post subject: Re: Gmsh tutorial 7
PostPosted: Fri Jun 18, 2010 4:16 am 
Offline

Joined: Fri Mar 05, 2010 6:08 am
Posts: 17
Dear Henk,



I could see the Pressure color contor of Man's skin by excuting Thresh Hold filter in Paraview.

Thank you for your Help !!


Regards,


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron


Cyclone
Franken
Franken
Consultancy
www.dolfyn.net EU Brabant

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group