CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   moveDynamicMesh (https://www.cfd-online.com/Forums/openfoam/79032-movedynamicmesh.html)

Sylvain August 10, 2010 10:40

moveDynamicMesh
 
Hi,

I just took a look on the SnakeRiverCanyon tutorial for moveDynamicMesh, and it looks to me a very interesting way to mesh large topological areas for atmospheric simulations.

In the triSurface folder one can see the .stl file which is actually used but also an .XYZ file. I suppose it means that we can also use a XYZ file instead of a stl file. But I didn't succeed in setting the .0/pointDisplacement file in this way.

Anyone has an idea???

Thank you in advance!!!

Sylvain

nlc September 15, 2010 18:56

Test MoveDynamicMesh
 
2 Attachment(s)
I don't know for the xyz file but in the snakeRiverCanon it look for a stl file: AcrossRiver.stl
in the 0/ bundary

for my part I'm trying to understand how it work and what are the limit of this option for a mesh on complex terrain !

I tried a 2d case of a bump and realize that the transportProperties nu play a great role in this solver at least with displacementSBRStress that I try to understand better !

There is also one thing I like to do with moveDynamicMesh. Its to set a boundary condition that would set the distance equal on the stl boundary. Ultimately I would like to ave the distance of the point on the stl depend on the curvature of this stl.

But No such boundary condition seam to exist on this solver and for me right now this seam a huge task for me a beginner !

Please Look at the case and the png and if you know how to make it better you are more then welcome

Regards

nlc September 23, 2010 10:07

2 Attachment(s)
I change parameters, use diffusivity exponential 2 inverseDistance 1(minZ), 2 blocks and I got better results I think !

But it still could be improve at the boundary and on top. On the ground the BC dos not allow the nod to move to relax the mesh close to the ground. Once the point is on the stl it stay right there. Witch it is a problem I think! If there is a way to do it I don’t know it for now !

samiam1000 September 21, 2011 11:08

Hi guys,

I am a step behind you and I decided to write to you.

I can not find a guide to use this tutorial. But I really wish to be able to run it, since I need to perform a wind simulation over a terrain in a certain area of Europe.

What I want to do is to download a DTED map and then perform a simulation.

The point is that I am pretty new, here and I need help.

Could you explain how to solve and post-process this SnakeRiverCanyon tutorial?

Thanks a lot for help,

Samuele

nlc September 21, 2011 15:45

I can but you need to tel me where you are stok!!

blockMesh
moveDynamicMesh

set the case:
move the mesh you just did to the new case ...

I do wind simulation to. Just to know.

Did you change the wall function ?
Do you use fixed gradient or fixed value on top ?

Regards

samiam1000 September 21, 2011 17:47

Dear Ubald,

thanks a lot for answering.

Well, the 1st thing that I do is to give the 2 commands that you mentioned:
- blockMesh
- moveDynamicMesh (or snappyHexMesh)

Now I should get a mesh (in which folder?) and my question is: which is a good case to perform a wind simulation? I mean: in which case I have to copy my new mesh?

Furthermore, could you share with my your case?

Actually, so far, I have not changed any wall function.

If you agree, we can share a folder on dropbox (samuele.zampini@gmail.com)

Thanks for helping,

Samuele

nlc September 21, 2011 23:59

the final mesh will be in the final folder exemple "1123/" ther you'll find polyMesh folder

You put the content of the final foalder in constant foalder after backing up constant/polyMesh/

mv constant/polyMesh/ constant/polyMeshOrig ...

I will look how to add you to dropbox

regards

samiam1000 September 22, 2011 04:18

Dear Nicolas,

first of all, thanks for answering.

Well, to add me in dropbox is very simple: just upload the case folder in dropbox and then share it with me.
I will receive a notification and everything will be ok!

Also, if I check the folfer 25/polyMesh (being 25 my last folder!), I have only a file inside. It is "point".
On the other hand, if I check the folder 0/polyMesh, I find more files in it.

Is that correct?

Furthermore, do you know why if I use snappyHexMesh instead of moveDynamicMesh I get the following error:

Code:

sammy@nash:~/OpenFOAM/sammy-2.0.1/run/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon$ snappyHexMesh
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 2.0.1-51f1de99a4bc
Exec  : snappyHexMesh
Date  : Sep 22 2011
Time  : 10:17:54
Host  : nash
PID    : 3525
Case  : /home/sammy/OpenFOAM/sammy-2.0.1/run/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Read mesh in = 0.05 s


--> FOAM FATAL IO ERROR:
cannot open file

file: /home/sammy/OpenFOAM/sammy-2.0.1/run/tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/system/snappyHexMeshDict at line 0.

    From function regIOobject::readStream()
    in file db/regIOobject/regIOobjectRead.C at line 87.

FOAM exiting


nlc September 22, 2011 10:14

1 Attachment(s)
to run snappyHexmesh you need a dictionary as you do for moveDynamicMesh that is why you get this error there is no dictionary for snappy in SnakeRiverCanyon !

You can use both on the same case but then you do it one after the other !!

I put an exemple on the dropbox this one use snappy end moveDynamicMesh maybe I should right a script to help you but at lest its an other exemple !!


From what I understand, OpenFOAM write in the solution folder only the thing that change from original so it would be normal to ave only points file in your case.

Each tool in OpenFOAM is different you might want to learn one at the time !

I also find an other tool to split a subset of cells in the direction you want not necessary in the three direction at the same time but that is an other story.

ps: please dont unzip the foalder in the drupbox !

Regards

samiam1000 September 22, 2011 11:22

Thanks a lot.

I'll work on it, soon and I'll let you know.

Keep in touch,

Samuele

nlc September 22, 2011 14:39

welcome :)

olivier78 October 4, 2011 23:12

convert .xyz to .stl
 
Hello openFoamer,

I just had a look at the SnakeRiverCanyon tutorial, it is an interesting tutorial and I agree that the SBR solver is using the .stl surface. However a .xyz file is also present in the tutorial directory.
my question is: how can the .xyz file be converted into and .stl surface ?

Olivier

Sylvain October 5, 2011 00:58

Hi Olivier,

You can convert un xyz to a STL using paraview:

1) change the xyz extension to a csv
2) open the csv in paraview using the csv reader, choose 1 column for each coordinate
3) use the "TableToPoints' filter to obtain an array of points.
4)use the delaunay tool to "map" a suface from the point
5) save the data, you 'll be able to save it as an stl

TADAAA!!! paraview is your friend. Of course if you have a CAD software as Rhinoceros, it's even easier


Sincerely

Sylvain

ic3wall November 10, 2011 23:22

Quote:

Originally Posted by Sylvain (Post 326719)
Hi Olivier,

You can convert un xyz to a STL using paraview:

1) change the xyz extension to a csv
2) open the csv in paraview using the csv reader, choose 1 column for each coordinate
3) use the "TableToPoints' filter to obtain an array of points.
4)use the delaunay tool to "map" a suface from the point
5) save the data, you 'll be able to save it as an stl

TADAAA!!! paraview is your friend. Of course if you have a CAD software as Rhinoceros, it's even easier


Sincerely

Sylvain

I just tried your procedure and got the following warning:

Delaunay3D Unable to factor linear system


Then I create the surface (Extract Surface) but it's impossible to see the results. I save it as .stl and can't see the content of the file.

EDIT: Use Global Mapper instead http://www.globalmapper.com/ !


All times are GMT -4. The time now is 10:20.