CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [snappyHexMesh] Insert Box of Water in SHM object (https://www.cfd-online.com/Forums/openfoam-meshing/113197-insert-box-water-shm-object.html)

raysark February 14, 2013 12:32

Insert Box of Water in SHM object
 
Hi,

I am new user in OpenFoam and I hope that you can help me.

I have created three connected tubes using AutoCad and used them as my snappyHexMesh object.

I want to enter a box of water inside this object. I am trying to set the coordinates in the setFieldsDict but nothing appears when I execute the simulation.

Any ideas on how I can do it?

Please help:)

Thank you

Stratos

Tobi February 14, 2013 12:48

Hi Stratos,

well that is not a problem belong to my topic but I think I can help you. Open a new thread for that, couse in this one we only discuss about meshing with sHM and multi regions.

Maybe I got something wrong with your question but setFields you are using after meshing to get a user defined value like. alpha = 1 or U, p, T into a certain region of the mesh.

wyldckat February 15, 2013 07:12

Greetings to all!

Quote:

Originally Posted by Tobi (Post 407862)
well that is not a problem belong to my topic but I think I can help you. Open a new thread for that, couse in this one we only discuss about meshing with sHM and multi regions.

Done! I've moved Statos' post from this thread: http://www.cfd-online.com/Forums/ope...e-regions.html

@Stratos: It's hard to help you if you don't provide more information ;) If possible, please share your case or provide enough information for us to make a better guess of what you are doing wrong, such as what are the geometrical limits and what you "setFieldsDict" looks like and so on.
I suggest you read this thread: http://www.cfd-online.com/Forums/ope...-get-help.html

Best regards,
Bruno

raysark February 17, 2013 17:31

Dear Bruno,

Thanks for your interest. I was abroad and I could't reply sooner.

So I uploaded somes files with images in the following link.

Let me explain you. I have a normal blockMesh and then using snappyHexMesh is introduce and isolate the tubes you can see in the picture. In the setFieldsDict a set a boxToCell with water inside the tubes. But it doesn't appear. My first guess is that the problem is crated from the boxToCell. Please have a look and let me know if you need anything else.

If you can help it would be brilliant and lifesaving Thanks.

https://www.dropbox.com/sh/sgydndlw3rk1u0i/A4-Y6tU4hu

wyldckat February 18, 2013 04:07

Hi Stratos,

How are you trying to visualize the water inside the domain? Have you tried applying the filter "Contours" with a value of 0.5, for the field alpha1?

edit: Did you use:
Code:

snappyHexMesh -overwrite
Best regards,
Bruno

raysark February 18, 2013 15:15

Hi Bruno,

Thanks for the help. I noticed a mistake that I have to fix before inserting the water.
I have merged some dictionaries from the damBreak case and the wigleyHull.

I will upload a second link if you could spare some time to see how it works and tell me your opinion for the issues. it should't take more than five minutes if you run blockMesh, setFields and snappyHexMesh.

Kind Regards,

I will come back very soon when I have the issues fixed.

Thanks a lot
Stratos

wyldckat February 18, 2013 15:20

FYI, it's the other way around:
  1. blockMesh
  2. snappyHexMesh -overwrite
  3. setFields
;)

raysark February 18, 2013 15:28

Did this too but no solution given. Actually the snappyHexMesh overwrite produces some fields ccx ccy ccz (remained from the wigleyHull case - thats the problem I have to solve).
If I don't use snappyHexMesh -overwrite what's the difference?

Here is the link

https://www.dropbox.com/sh/1dbdedtxtk5b9pi/yZfUA8gPnB

wyldckat February 18, 2013 15:45

I think Dropbox is still syncing up... several files are missing, specially in "system".

"-overwrite" ensures that the mesh is overwritten. Otherwise, the new mesh is saved in one or more time folders, depending on the meshing stages. Which means that setFields will only have effect on... whatever time folder that it considers to be proper...
In addition, if the mesh is on a folder other than constant or zero, you have to adjust "system/controlDict" accordingly.

raysark February 18, 2013 15:54

Dropbox synced.

Many thanks for the time you spent I really appreciate that.

I will have a look on the setFields.

Tobi February 18, 2013 16:37

2 Attachment(s)
Here your case.

Without -overwrite openfoam saves your mesh a new timestep folder like 0.001 (for castellated) and 0.002 (for snapped mesh).

Use Allrun

PS: Mistake in setFields

Tobi

raysark February 18, 2013 17:44

I used Allrun but openFoam displays that file points in directory polyMesh is missing.


And why did you removed the snappyHexMeshDict?

Thanks

Tobi February 18, 2013 18:41

Quote:

Originally Posted by raysark (Post 408567)
I used Allrun but openFoam displays that file points in directory polyMesh is missing.


And why did you removed the snappyHexMeshDict?

Thanks


Maybe you have a other system:

just type into the consol:

Code:

cp files/blockMeshDict constant/polyMesh/
blockMesh
snappyHexMesh -overwrite
createPatch -overwrite
rm -r 0
cp -r 0.org 0
setFields

done :)

If you have a look into the system folder you ll see that I do not remove the snappyHexMeshDict.

raysark February 18, 2013 18:44

Create time

Reading createPatchDict

Create polyMesh for time = 0



--> FOAM FATAL ERROR:
Cannot find file "points" in directory "polyMesh" in times 0 down to constant

From function Time::findInstance(const fileName&, const word&, const IOobject::readOption, const word&)
in file db/Time/findInstance.C at line 188.

FOAM exiting



Anyway I am quite sleepy. I will try it again tomorrow and I will tell you. thanks for the help.

Tobi February 19, 2013 01:13

Hi,

you should do it step by step.
"createPatch" you have to do after meshing!

raysark February 22, 2013 09:26

Hi Tobi,

I was off of some days. You solved my problem thanks a lot.

The file points was a problem of OpenFOAM version i Tested it in 2.1.1-18 and worked (i habe 2.1.1-22 which seems quite strange).

If I have anything else I will ask again.

Best Regards,
Stratos

raysark March 11, 2013 14:53

Hi Tobi,

Sorry for asking again for help but I think you can help.

I posted this:

http://www.cfd-online.com/Forums/ope...ion-error.html

Could you help me with these case?

Thanks


All times are GMT -4. The time now is 08:07.