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/)
-   -   Preparing Simulation of a Sphere in a Flow (https://www.cfd-online.com/Forums/openfoam-pre-processing/162473-preparing-simulation-sphere-flow.html)

PonchO November 10, 2015 19:18

Preparing Simulation of a Sphere in a Flow
 
3 Attachment(s)
A warm hello to everyone :),

I want to simulate the flow around a sphere in a tube. Inside the sphere there can be flow as well (electromagnetic forces). It mimics something like a drop, which is steady in a spherical shape. At the interface some reactions and temperature diffusion is going on. But first, I want to look at the flow only.

My first idea was:
1) to make 2 meshes. One for the surrounding flow, one for the flow inside the droplet.
2) Then merging the meshes
3) and stitch them together
4) Afterwards, create a faceSet of the interface
5) create a baffle and applying different boundary conditions for the master and slave patch of the baffle to account for slip boundary inside the droplet and no slip boundary for the outer flow

I started preparing both meshes with snappyHexMesh. The meshes seem good and checkMesh gave me good values. The mergeMesh command worked good, but after stitching (stitchMesh -partial sphereOut sphereIn), I get many nonOrthoFaces at the interface.

On the first picture, you can see both meshes before merging and stitching. The second picture shows the stitched mesh. There you can see the first low quality cells introduced. On the third picture, there are the nonOrthoFaces visible (by foamToVTK -faceSet nonOrthoFaces).

I read about using the stitchMeshTolerancesDict, but I get an error when I do the command:

Code:

stitchMesh -partial -toleranceDict system/stitchMeshTolerancesDict sphereOut sphereIn
Code:

Create time

Create mesh for time = 0

Coupling partially overlapping patches sphereOut and sphereIn
Resulting internal faces will be in faceZone sphereOutsphereInCutFaceZone
Any uncovered faces will remain in their patch


--> FOAM FATAL IO ERROR:
cannot open file

file: foobar/Case/system/stitchMeshTolerancesDict at line 0.

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

FOAM exiting

So I am stucked.

I read already these threads:
http://www.cfd-online.com/Forums/ope...titchmesh.html
http://www.cfd-online.com/Forums/ope...titchmesh.html
http://www.cfd-online.com/Forums/ope...mesh-used.html

But none of them comes to a final solution in my opinion.

Does anybody can help me to:

1. get the stitchMeshTolerancesDict running?
2. Had this problem before and knows a solution?
3. Has a better idea to tackle this problem? I thought about multiRegionFoam, but I don't know if it can handle different boundary conditions for different flow fields at the interface.

Thanks in advance :),

Christoph



My System:

OpenFOAM Version: OpenFOAM-2.4.x
Operating System: Manjaro Linux 15.09
Hardware: Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz


http://postimg.org/image/4cfdw118p/

PonchO November 11, 2015 15:40

Hi,

I managed to solve the problem with the stitchMeshTolerancesDict. It has to be inside the /constant folder. And should be just addressed by the filename, not the path.

After playing around with the dict for half an hour, I made no progress. Reduced nonOrthoFaces from about 5000 to about 3000 but introduced other errors in the mesh. So if someone is out there, that managed to handle these interface problems, please leave a comment :o.

I thought also about using interFoam with high surface tension in order to fix the spherical shape, but then I may introduce the well known parasitic currents. And i have the problem, that the drop will be just fall down or will be thrown out of the domain, because of the outer fluid flow. So not a good solution in my eyes.

I may add some informations regarding the subject:
It is a liquid metal droplet, which is levitated by a magnetic field at very high frequency. The surrounding is a protective atmosphere avoiding oxidization. Hence the droplet will be somehow spherical (assumption), stirred insight and surrounded by gas flow.

If someone is interested I can upload the configuration files for the meshes ;).

Thanks,

Christoph


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