CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   2D simulation (https://www.cfd-online.com/Forums/openfoam-pre-processing/141185-2d-simulation.html)

Metti September 1, 2014 14:21

2D simulation
 
Dear friends & foamers,

i'm about to simulate an internal 2D flow in a channel, that the geometry is meshed with SHM and finally i used "extrudeMesh" to extrude the mesh in z-direction to have just one cell thick from "front" to "back" patches.

so, this is already done and now just on cell remained between these 2 faces.

my question is that am i forced to set "empty" as the type of BC for these patches to have a 2D simulation when running the solver , or having only 1 cell thick in mesh is enough for the solver to perform a 2D simulation?

ssss September 1, 2014 14:58

I think it's you need to set them to empty, if not OpenFoam will think you are in a 3D simulation although you have 1 cell in the 3rd direction

But it takes only 5 minutes to test it :p

jhoepken September 2, 2014 10:32

Yes, you have to set it to empty.

Metti September 2, 2014 12:08

I'm really grateful of your reply.

many thanks though.;)

so the question which remains is that when i manually change the "front" and "back" BC's from "wall" to "empty" after "extrudeMesh", the checkMesh gives the "nonAligned" error in my mesh. what's the key?
1. does the problem originate from my mesh generating process?
2. or should i change the BCs to "empty" in other way?

what's the procedure so?

Metti September 12, 2014 09:19

Hey Foamers..;)

any hint or suggestion for the previous questions?

wyldckat September 13, 2014 05:40

Greetings to all!

@Metti, friendly reminder: the more information you provide, the easier/quicker it gets to get an answer. Although it might still take 7 days to get said answer... but at least it won't be 14 or 21 days ;)

I vaguely remember that there is one or more versions of OpenFOAM where checkMesh incorrectly diagnoses issues regarding 2D meshes. If you had stated which OpenFOAM version you're using, I could have checked this myself.

Since you didn't, my suggestion is that you try running checkMesh with the very first tutorial that the OpenFOAM User Guide talks about, namely "incompressible/icoFoam/cavity", to see if you get the same response from it :D. If it does not give you the same answer, then please give us more details on how exactly you're generating the 2D mesh. Keep in mind that the smallest detail might be enough for OpenFOAM to complain ;)

Best regards,
Bruno

Metti September 13, 2014 10:47

3 Attachment(s)
Dear Bruno, Dear all..,

First of all I appreciate your reply though.
I'm using OF 2.2.2 .

My Project in brief:

" I have the passage of a turbine cascade which i want to simulate the 2D flow through this"

* the geometry was just one part But i separated it to 10 patches(inlet-outlet-front-back-pwall-swall-and 4 cyclics) to have them as my boundaries because i use SHM.
* I have a block as my base mesh from "blockMeshDict" and then I run "SHM". (my files are attached for more detail if needed)

Now I'm in the middle of 2 problems a couple of days. :mad:

1) my geom. is mainly 3D and so the mesh from SHM is 3D too. But i want to have just one cell thick between front & back, that i use "extrudeMesh" after "SHM" and i will get 1cell thick. but i don't know how to change the type of my BCs to "empty"? manually? or i should use some other Dicts?
what ever i do i'll face the error of "non-AlignedEdges" after checkMesh.

2) I have 4 boundaries that should be cyclic 2 by 2. for this, i use createPatch to change their types to "cyclicAMI" bacause after SHM i don't have similar meshes on these patches to name them to "cyclic".
I do this part(createPatch) fine and get cyclicAMI patches without any error and checkMesh is OK(in the absence of "empty" BCs). But reluctantly i should say that even when i run the solver(even if my front and Back BCs are set to "wall") the run progress stops and crashes out from the beginning.

Files are attached.
any clue would be helpful on these issues.

Best regards,
Metti.

Mojtaba.a September 13, 2014 16:33

Dear Mehdi,

I suggest you to start by a simple case, try removing any features which makes your problem more complex.

Try to focus on 2D and empty patches. See if you can run a simple 2D case. Share checkMesh results in here to see what can be wrong with your problem. :)

Best.

wyldckat September 28, 2014 15:25

Greetings to all!

@Metti: I hope you've followed Mojtaba's suggestion and that you've taken a few steps back to a simpler case, so that you could isolate one issue at a time.
I say this as well because the information you had provided unfortunately wasn't nearly enough to deduce what might be the exact problem. My best guess is that you found an old bug or that the cell thickness along the empty direction is not properly aligned with any major axis, which could lead to numerical issues.

As for changing the patches to type "empty", have a look at "applications/utilities/preProcessing/changeDictionary/changeDictionaryDict".
Now that I think about it, I probably already wrote about it somewhere here on the forum... here you go: http://www.cfd-online.com/Forums/ope...tml#post282226 post #2

Best regards,
Bruno

zandi October 5, 2014 19:50

Quote:

Originally Posted by Metti (Post 508845)
checkMesh gives the "nonAligned" error in my mesh. what's the key?
1. does the problem originate from my mesh generating process?
2. or should i change the BCs to "empty" in other way?

what's the procedure so?

Hi Metti
answer to Q. 2: you have to defined back and front empty by changing in boundary file after extrudeMesh. you can back up the boundary file by saving it in boundary.org file for further runnings.

answer to Q. 1:
may be it's because of not well defining patches or not aligned mesh blockes.

Metti October 6, 2014 09:56

Quote:

Originally Posted by zandi (Post 513027)
Hi Metti
answer to Q. 2: you have to defined back and front empty by changing in boundary file after extrudeMesh. you can back up the boundary file by saving it in boundary.org file for further runnings.

answer to Q. 1:
may be it's because of not well defining patches or not aligned mesh blockes.

Hi Fatema,

I'm grateful of your kind reply..

1. for your Q.2 , I should say that I myself have changed my boundaries to empty as you said in your recommendation.

2. for your Q.1 ,would you please advise me on how to mesh a complex geometry with internal flow?
( I used SHM for the mesh generation process of my case as a curved channel (cascade) with 10 boundaries which 4 of them are "cyclic" 2 by 2, and the front & back are "empty" as well But using SHM causes not being able to name these 6 patches like what i said)

any comment would be appreciable.:)

zandi October 10, 2014 16:17

Quote:

Originally Posted by Metti (Post 513104)
2. for your Q.1 ,would you please advise me on how to mesh a complex geometry with internal flow?

what do you mean by complex mesh?
didn't the Mojtaba's suggestion work?


All times are GMT -4. The time now is 05:36.