Is there an 'internal' boundary condition?!
Hello World.
Due to the fact that the sample tool can't handle curved surfaces I had to create a patch, which can be accessed from sample. The patch containing the surfaces of interest lie within the domain and I created a patch (or rather two) from the faceSet using splitMesh. This patch (or faceSet) should stay 'internal' so I am running into a problem which boundary condition I should choose. Because of the fact that this patch has no physical meaning and its sole purpose is the sample location it should simple be treated as an internal surface. How can I assign an appropriate boundary condition to this patch? |
You'd need something like a cyclic patch (maybe see the jump condition too), but then you have to ensure that the face numbering matches up etc (lots of annoying work).
IMO you should actually just attempt to solve the problem directly - it would be less work and be more useful in the future. That is to say, write some new sampledFaceSet/sampledFaceZone classes. The classes would resemble in large sampledPatch, but get their values from a faceSet or faceZone, respectively. I think that others could benefit from it too. |
Quote:
Unfortunately I don't know how writing such a class can be done. Do you have a suggestion where I could start investigating on this subject? |
Quote:
|
Dear Sebastian,
there are more alternatives 1) Create two separate meshes + equation coupling ($FOAM_TUTORIALS/conjugateHeatFoam/heatedBlock/) 2) Single mesh + topological changes ($FOAM_TUTORIALS/icoDyMFoam/mixer2D/) none of which I would recommend. All the sampling is on runtime-selection. So have a look through here $FOAM_SRC/sampling/sampledSurface/plane/sampledPlane.C $FOAM_SRC/sampling/sampledSurface/patch/sampledPatch.C and create a modified version that uses a faceZone to set up the interpolation. Henrik |
Quote:
It is not only more memory efficient, it will also work better with domain decomposition etc. |
Quote:
Meanwhile I have to say I made a huge effort to create a faceSet. What is the difference between faceSet and faceZone? Do I have to discard my work on the faceSet? |
Quote:
A {face,cell,point}Set is stored as a labelHash. A {face,cell,point}Zone is stored as a labelList. A {face,cell,point} can belong to any number of sets, but can only belong to zero or one zones. The zones have the advantage that they are directly part of the polyMesh class. Since there is a maximum of one-to-one correspondence between a face and its zone, renumbering (eg, domain-decomposition) works much more easily. Depending on how you create your sets, you might be able to create zones directly. Otherwise, the 'setsToZones' utility might help you. |
Quote:
I think this is too much for me as I don't have any idea what I am doing. Blindly replacing names just don't seems right to me in such a challenging task. What is the meaning of "build the list of faces from the faceSet.toc()"? I thought "building" involves some wmake command? |
Quote:
Thanks for your suggestion. The code in these two files look even worse to me than sampledSurface. As I have mentioned in my previous post I fear we are overestimating my knowledge in this case. I can only suggest you take my problem as a recommendation for some future implementation (which should be done by someone more experienced). Meanwhile I will take a look into your 'reciepe' for beginners in http://www.cfd-online.com/Forums/ope...ogramming.html |
Dear Sebastian,
"SampledSurface is the virtual base class of both sampledPlane and sampledPatch and cannot be instantiated or used on its own" If your asking yourself: - How do I know that sampledSurface is the base class - How do I know that sampledSurface is virtual - and why it cannot be instatiated or used then, IMHO, you will find it quite hard to make this fly. However, I can only stress what Mark said: This is not very difficult, especially if you create the sampledSurface from a faceZone, but it requires some basic C++-knowledge. Saying that, the questions above are not really covered by the step-by-step intro to OF programming that I mapped out in the link. So questions remains: "What do I need to know to be able to do XYZ in OpenFOAM?". I would love to see such step-by-step guides on the Wiki - for future reference and to throw at newbies ;) I think the first thing to do would be to formulate what YOU want to be able to do and then WE can start threads/Wiki documents to provide step-by-step guides. A list of books (or better chapters of books) would be helpful, too. Henrik |
Quote:
Quote:
Code:
labelList myFaces = myFaceSet.toc(); |
Quote:
I'm glad I've got your attention - I appreciate that. As proposed by you I will give you an overview what I want to do. As a matter of fact I have scattered these information all over the forum, but I will give you a short overview. Although it is not directly related to the sampling-solution I will tell what simulation we are dealing with. Its the turbulent simulation of the flow inside of an axisymmetric 3D domain (actually its the combustion chamber of an aircraft's turbine). After the simulation inside the domain is finished we want to take a close look on some part of the domain. Have a look at this image. I'm talking about the red sub-domain: http://therealsega.th.funpic.de/openfoam/ekt/arc.png We want to use a different solver and a different discretization on the sub-domain (which exists separately from the big domain!) as we assume there is something interesting happening to the fuel jet. This should be made possible by:
But in the real case we are dealing with curved surfaces whose boundaries lie within the domain and therefore can't be accessed by the sample tool (which deals only with cutting planes or patches). This is why I thought about making sample work on faceSets, because the faces of interest (the red ones) can easily be selected as one. I hope I made the case clear. Discussion is open ... :) |
Dear Mark, dear Sebastian,
why don't you both come to the Stammtisch and do the trade there (programming and payment)? Henrik |
creating circular patch
Hi,
I have gone through this threat and felt like it is the better place to seek if it is possible to create circular patch on hex faces. topoSet can be used to list all the faces in specified circular region and can create new patch but solution is diffusive as the patch looks like castled circle. Is there any way to create circular patches? Regards, CFDUser_ |
Quote:
For who came after that is trying to define the monitor patch within the mesh, you just need to delete the internal face in boundary file under polyMesh and use the faceZone as the index for the monitor |
Quote:
I'm new to openfoam how should I use the faceZone as the index foe the monitor? |
All times are GMT -4. The time now is 00:24. |