|
[Sponsors] |
July 23, 2019, 19:01 |
3D semisphere in openfoam
|
#1 |
Member
FaRa
Join Date: Jul 2019
Posts: 33
Rep Power: 7 |
Hello everyone. I am new to OpenFOAM. I have used cylinderToCell to define a semi-sphere in 2 dimension. Now I want to make a 3 dimensional semi-sphere. Any idea would be appreciated. Thank you.
|
|
July 24, 2019, 17:18 |
|
#2 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
sphereToCell
PS: You can make use of boolean operations in topoSet in order to customize your cellSet (e.g. a "sphereToCell" minus a "boxToCell" ) Last edited by guin; July 24, 2019 at 17:19. Reason: typo |
|
July 24, 2019, 17:26 |
|
#3 |
Member
FaRa
Join Date: Jul 2019
Posts: 33
Rep Power: 7 |
Thank you so much for your reply. I will give it a try.
Also I want to show this semi-sphere at the bottom plane of a cube. Is there any way to show this like keeping the side walls transparent and only the sphere colorful in Paraview? |
|
July 24, 2019, 17:56 |
|
#4 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Sure, there is an "opacity" variable for every filter you set in ParaView. It is a question of doing the right hierarchical selection of objects. For that, the best is to play a little bit with ParaView until getting something satisfactory. I recommend you to "google" for some video tutorials of ParaView. You'll get familiar quite fast with it.
|
|
July 24, 2019, 20:05 |
|
#5 |
Member
FaRa
Join Date: Jul 2019
Posts: 33
Rep Power: 7 |
I've tried to create the sphere as the way you have mentioned. The simulation ran without any error. but the sphere is not showing in paraview. Is there any reason behind this? I have also reduced the opacity to see this. but nothing was there.
|
|
July 25, 2019, 03:59 |
|
#6 | |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Quote:
In addition, you may want to post this question at the "OpenFOAM Post-Processing" sub-forum instead, since it is more related with your problem. |
||
July 25, 2019, 04:21 |
|
#7 |
Member
FaRa
Join Date: Jul 2019
Posts: 33
Rep Power: 7 |
Thank you for your reply.
Since I am new in this forum and field too so i am just still learning. I am trying to simulate nucleate boiling in 3D with VOF and also I am at my initial stage. Initially I wanted to create a bubble at the bottom plane of a cube. Here is my blockMesh file: Code:
convertToMeters 1; vertices ( (0 0 0) (0.031 0 0) (0.031 0.031 0) (0 0.031 0) (0 0 0.031) (0.031 0 0.031) (0.031 0.031 0.031) (0 0.031 0.031) ); blocks ( hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1) ); edges ( ); boundary ( bottom { type wall; faces ( (1 5 4 0) ); } outlet { type patch; faces ( (3 7 6 2) ); } walls { type wall; faces ( (0 4 7 3) (2 6 5 1) ); } ); mergePatchPairs ( ); Code:
actions ( { name c0; type cellSet; action new; source sphereToCell; sourceInfo { centre (0.0155 0.0155 0); radius 0.001; } } { name c0; type cellSet; action delete; source boxToCell; sourceInfo { box (0.0145 0.0145 -0.001) (0.0165 0.0165 0); } } ); Code:
defaultFieldValues ( volScalarFieldValue alpha1 1 volScalarFieldValue T 559.95 volVectorFieldValue U (0 0 0) ); regions ( boxToCell { box (0 0.026 0) (0.031 0.031 .031); fieldValues ( volScalarFieldValue alpha1 0 volScalarFieldValue T 559.95 volVectorFieldValue U (0 0 0) ); } cellToCell { set c0; fieldValues ( volScalarFieldValue alpha1 0 volScalarFieldValue T 559.95 volVectorFieldValue U (0 0 0) ); } ); |
|
July 25, 2019, 04:50 |
|
#8 |
Member
Rodrigo
Join Date: Mar 2010
Posts: 98
Rep Power: 16 |
Your mesh is way too coarse for resolving the bubble you try to generate. Your mesh elements should be considerably smaller. The reason is that topoSet is not an analogic tool. It simply adds cells to the set depending on whether their cell center is or not contained in the shape you passed. Similarly, setFields will only switch the values of the selected cells from the default one to the newly specified, so you can expect at the end a kind of Mindcraft-like / Lego-like sphere.... By the way, I may have something useful in this regard... provided you work with a refined mesh: https://github.com/dolphguin/adjustVoFScalarFields
To sum up your options: - Increase the sphere radius - Reduce the size of your cells so that at least you have about 10 cells within the radial length (if you want to obtain something that starts looking like an sphere). The link I passed you may be of help to interpolate the values of alpha1 afterwards. In order to avoid dealing with millions of elements, I recommend you to take a look at a pre-processing tool called "refineMesh" in order to pre-refine only a certain part of your mesh (you can call it several times if more than one refinement is needed). Good luck! |
|
July 25, 2019, 05:45 |
|
#9 |
Member
FaRa
Join Date: Jul 2019
Posts: 33
Rep Power: 7 |
Thank you so much for your help. I am going to try this.
|
|
Tags |
3 dimension, semi-sphere, setfields |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Frequently Asked Questions about Installing OpenFOAM | wyldckat | OpenFOAM Installation | 3 | November 14, 2023 12:58 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
OpenFOAM Foundation Releases OpenFOAM v2.3.0 | opencfd | OpenFOAM Announcements from OpenFOAM Foundation | 3 | December 23, 2014 04:43 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |