|
[Sponsors] |
Gradients on surfaces or how to find neighbour faces for face on a patch |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 7, 2007, 11:09 |
Hi there,
For a face on a p
|
#1 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
Hi there,
For a face on a patch, I need variable values on the neighbouring faces (I want to compute a gradient on the surface). I have spent quite some time now on it, but the only way I could figure out was to get the corresponding internal cell, cycle through its faces, get the neighbour cells for these faces, check their faces if they are external - in short, horribly messy and prone to errors. Is there perhaps any hidden functionality which could give me that in an easier way? Thank you! Thomas |
|
May 7, 2007, 11:19 |
It sounds like you really wish
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
It sounds like you really wish to be iterating over the boundary patches.
The quick-start would be to look at applications/utilities/postProcessing/wall and see if they do something similar to what you need. |
|
May 7, 2007, 12:18 |
Thank you - but there is some
|
#3 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
Thank you - but there is some misunderstanding:
@Marc: its not just iterating - for each face (I can iterate through faces) I would like to know the faces sharing edges with this face on the surface - which reminds me right now that somewhere I have seen a function called edgesFaces .... have to search again ... @Bernhard: snGrad gives me the gradient normal to surface, I need the tangential one ... I have also tried to figure out the finiteArea stuff - there is some code to compute gradients on areaMeshes - here I am stuck with that I do not know (Yet?) how to construct a faMesh. Found a constructor taking a polyMesh - but is that only my surface mesh? If so, how to make a polyMesh from my boundaryMesh? Questions, questions, questions .... I think you can really get lost in OpenFOAM - a lifetime occupation |
|
May 7, 2007, 14:56 |
Tangential gradient can be cal
|
#4 |
New Member
Zeljko Tukovic
Join Date: Mar 2009
Posts: 22
Rep Power: 17 |
Tangential gradient can be calculated using finite are calculus. See the attached application and case.
Regards, Zeljko Tukovic |
|
May 8, 2007, 03:30 |
Zeljko, sounds great!
But t
|
#5 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
Zeljko, sounds great!
But the links dont work, there is just an image |
|
May 8, 2007, 03:44 |
sorry, just saw your mail.
|
#6 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
sorry, just saw your mail.
Works out of the box, sweet! Thank you a lot! Thomas |
|
May 8, 2007, 05:32 |
Hello!
May I also have the
|
#7 |
New Member
Normunds Jekabsons
Join Date: Mar 2009
Location: Riga, Latvia
Posts: 10
Rep Power: 17 |
Hello!
May I also have the same example? The link in post above seems to be broken. Thank you a lot! /Normunds |
|
May 8, 2007, 08:33 |
Hi Normunds,
I suppose its
|
#8 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
Hi Normunds,
I suppose its o.k. if I post it here again, since Zeljko tried to do that already. So here is what he tried to post and then sent me by mail: http://servww6.ww.uni-erlangen.de/~j...rfGradCase.tgz http://servww6.ww.uni-erlangen.de/~j...adientFoam.tgz |
|
May 8, 2007, 09:02 |
I got it. Thank you very much
|
#9 |
New Member
Normunds Jekabsons
Join Date: Mar 2009
Location: Riga, Latvia
Posts: 10
Rep Power: 17 |
I got it. Thank you very much both, Zeljko and Thomas, with it I will save a lot of my time!
Have a nice day! /normunds |
|
May 9, 2007, 04:22 |
Zeljko,
I just found out I
|
#10 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
Zeljko,
I just found out I apparently need the utility makeFaMesh to generate the surface mesh, however, I cant find it. Do you have a hint perhaps? Thanks again! Thomas |
|
May 9, 2007, 04:34 |
OpenFOAM-1.3/applications/util
|
#11 |
New Member
Zeljko Tukovic
Join Date: Mar 2009
Posts: 22
Rep Power: 17 |
OpenFOAM-1.3/applications/utilities/mesh/generation/makeFaMesh
Regards Zeljko |
|
May 9, 2007, 04:51 |
no http://www.cfd-online.com/O
|
#12 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
no
its in tutorials/finiteAreaFoam/surfactantsTransport/makeFaMesh (at least in my OpenFOAM-1.3..) but thanks! |
|
May 9, 2007, 05:19 |
to whom it may concern:
the
|
#13 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
to whom it may concern:
the above mentioned makeFaMesh fails I then downloaded from http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/release/ OpenFOAM-1.3.General_01_05_07.tgz, made a backup copy of my original finiteArea subdirectory, copied the one from the downloaded distribution there, built libfiniteArea.so again, built makeFaMesh again, and voila - got the finite area mesh. |
|
May 9, 2007, 06:07 |
Zeljko,
Is there perhaps an
|
#14 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
Zeljko,
Is there perhaps an elegant way to transfer data from areaField (on surface mesh from a patch) to corresponding patchField (on patch from volume mesh) ? Currently I am trying to iterate over them and to assign values, but have the strong feeling this is not OpenFOAM-Style |
|
May 9, 2007, 06:42 |
May I see how you performe the
|
#15 |
New Member
Zeljko Tukovic
Join Date: Mar 2009
Posts: 22
Rep Power: 17 |
May I see how you performe the transfer?
Zeljko |
|
May 9, 2007, 07:36 |
You can do all that using the
|
#16 |
New Member
Zeljko Tukovic
Join Date: Mar 2009
Posts: 22
Rep Power: 17 |
You can do all that using the following line:
TSurf.internalField() = T.boundaryField()[pathcID]; where patchID = mesh.boundaryMesh().findPatchID("top"); If your area mesh consists of only one patch, face ordering in the area mesh is the same as in the patch. Zeljko |
|
May 9, 2007, 08:18 |
Hi Zeljko,
Do you plan on p
|
#17 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
Hi Zeljko,
Do you plan on porting the finite Area code to 1.4? Are parallel edge communications working yet? Eugene |
|
May 9, 2007, 08:35 |
alas ..... that changes everyt
|
#18 |
Senior Member
Thomas Jung
Join Date: Mar 2009
Posts: 102
Rep Power: 17 |
alas ..... that changes everything ....
does it mean that code wont work in parallel? |
|
May 9, 2007, 09:53 |
Yes, parallel edge communicati
|
#19 |
New Member
Zeljko Tukovic
Join Date: Mar 2009
Posts: 22
Rep Power: 17 |
Yes, parallel edge communications don't work yet. I plane to do that till the end of this year.
|
|
June 22, 2009, 10:15 |
finiteArea compiling error
|
#20 |
Member
Andrea Petronio
Join Date: Mar 2009
Location: Trieste, Italy
Posts: 43
Rep Power: 17 |
hi everybody,
I would like to try the finiteArea method for a film simulation, I'm working with the 1.5 release and I downloaded the 1.5-dev in order to get the finite area stuff. But when I compile the lduSolver that I think it's needed for finiteArea I get this error: In file included from lduPrecon/CholeskyPrecon/CholeskyPrecon.C:36: lduPrecon/CholeskyPrecon/CholeskyPrecon.H:56: error: expected class-name before ‘{’ token and this is the code line: class CholeskyPrecon : public lduPreconditioner { // Private Data Have you any hint? I've tried also with folders of version 1.4-dev and 1.4.1-dev, with same results. Thanks you in advance |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to access to faces of a patch | jaswi | OpenFOAM Running, Solving & CFD | 17 | October 7, 2020 11:30 |
Frontal projected reference face area computation from patch | kprzysowagmailcom | OpenFOAM Pre-Processing | 0 | January 6, 2009 11:06 |
Intersection from ray witrh patch or face | hjasak | OpenFOAM Running, Solving & CFD | 1 | August 1, 2007 11:02 |
Patch face centres order | shrina | OpenFOAM Running, Solving & CFD | 1 | October 3, 2006 04:48 |
Reversed flow in ###faces on face ### | TOM | FLUENT | 1 | March 1, 2002 12:43 |