|
[Sponsors] |
February 26, 2008, 16:54 |
FunkySetFields for OF 141
|
#1 |
Member
merrouche djemai
Join Date: Mar 2009
Location: ain-oussera, djelfa, algeria
Posts: 46
Rep Power: 17 |
Hi,
Did the latest version of FunkySetFields.r7568 work with OF 1.4.1. I try to compile it, but there are some errors? I hope that I find a quick response. Djemai |
|
February 27, 2008, 07:37 |
Hi Djemai!
That's right. Th
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Djemai!
That's right. That version only compiles with 1.4. Get the svn-version with the command described above the file that you downloaded Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
February 27, 2008, 17:47 |
Thank you Bernhard.
|
#3 |
Member
merrouche djemai
Join Date: Mar 2009
Location: ain-oussera, djelfa, algeria
Posts: 46
Rep Power: 17 |
Thank you Bernhard.
|
|
March 1, 2008, 08:58 |
Hi all,
I have recently compi
|
#4 |
Member
merrouche djemai
Join Date: Mar 2009
Location: ain-oussera, djelfa, algeria
Posts: 46
Rep Power: 17 |
Hi all,
I have recently compiled funkySetfields for OF 1.4.1, but when I run the utility I get some errors: ------------------------------------------------- #0 Foam::error::printStack(Foam:stream&) in "/home/mer/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #1 Foam::sigFpe::sigFpeHandler(int) in "/home/mer/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #2 Uninterpreted: [0x6d6420] #3 Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/home/mer/OpenFOAM/OpenFOAM-1.4.1/lib/linuxGccDPOpt/libOpenFOAM.so" #4 Foam::tmp<foam::geometricfield<double,> > Foam::sqrt<foam::fvpatchfield,>(Foam::GeometricFie ld<double,> const&) in "/home/mer/OpenFOAM/mer-1.4.1/applications/bin/linuxGccDPOpt/funkySetFields" #5 .L30835 at ValueExpressionParser.C:0 #6 ValueExpressionDriver::parse(std::string const&) in "/home/mer/OpenFOAM/mer-1.4.1/applications/bin/linuxGccDPOpt/funkySetFields" #7 doAnExpression(Foam::fvMesh const&, Foam::word const&, Foam::string const&, Foam::string const&, Foam::Time const&, bool, bool, Foam::dimensionSet const&, bool, Foam::List<foam::word> const&) in "/home/mer/OpenFOAM/mer-1.4.1/applications/bin/linuxGccDPOpt/funkySetFields" #8 main in "/home/mer/OpenFOAM/mer-1.4.1/applications/bin/linuxGccDPOpt/funkySetFields" #9 __libc_start_main in "/lib/i686/nosegneg/libc.so.6" #10 Foam::regIOobject::readIfModified() in "/home/mer/OpenFOAM/mer-1.4.1/applications/bin/linuxGccDPOpt/funkySetFields" Floating point exception ------------------------------------------------- Did anyone have an idea how to resolve this problem? Thanks Djemai |
|
March 1, 2008, 09:53 |
What is the expression you're
|
#5 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
What is the expression you're calculating? Is there a sqrt in it? By any chance a squareroot of a negative value? Because that is my suspicion when I look at #4 in your stacktrace
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
March 1, 2008, 13:30 |
Hi Bernhard,
Yes in my expres
|
#6 |
Member
merrouche djemai
Join Date: Mar 2009
Location: ain-oussera, djelfa, algeria
Posts: 46
Rep Power: 17 |
Hi Bernhard,
Yes in my expression there is a sqrt, but there is no negative value inside because all terms are powered to 2. simply it is an equation of a sphere add to other positive terms. Djemai |
|
March 3, 2008, 05:34 |
Could you please post the expr
|
#7 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Could you please post the expression anyway? The problem is definitly happening during the evaluation of the sqrt. On possibility to check: Let the utility calculate the expression INSIDE the sqrt and check the result (for NaNs etc)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
March 3, 2008, 08:56 |
Hi Bernhard,
I downloaded y
|
#8 |
New Member
Thomas Sponfeldner
Join Date: Mar 2009
Posts: 9
Rep Power: 17 |
Hi Bernhard,
I downloaded your svn-Version of funkySetFields from the wiki and renamed all files in order to get C-Files etc. But I do not know how to compile. I already tried "bison ValueExpressionParser.yy" to get .tab-Files but doesn't help (version 2.3). I also tried a wmake but it stopped and make writes: no rule to make target "funkySetFields.dep". Could you please help me? I use OF1.4.1. Regards, Thomas |
|
March 3, 2008, 10:29 |
Hi Bernhard,
Excuse me to tak
|
#9 |
Member
merrouche djemai
Join Date: Mar 2009
Location: ain-oussera, djelfa, algeria
Posts: 46
Rep Power: 17 |
Hi Bernhard,
Excuse me to take your time. Yes, it is my error. I put a sqrt in place of sqr inside the expression: sqrt(sqr(pos().x -2.*pow(10.,-2.))+sqr(pos().y -2.*pow(10.,-2.))+ sqr(pos().z -3.*pow(10.,-2.)))<=0.0001 ? 1:0 But I have another problem. using this expression with funkySetFields it doesn't initiate my field. I verify the same equation with setGammaDamBreak and it works. What is the problem. |
|
March 3, 2008, 12:07 |
Hi Thomas,
I have compiled th
|
#10 |
Member
merrouche djemai
Join Date: Mar 2009
Location: ain-oussera, djelfa, algeria
Posts: 46
Rep Power: 17 |
Hi Thomas,
I have compiled the last svn-Version of funkySetFields without any errors. To be sure that you are in the good way: 1) try to see if you have bison: bison -V 2) don't forget to run insertGenerated.sh 3) wmake should be inside the funkySetFields directory with the presence of Make directory. Hope this will help. Djemai |
|
March 3, 2008, 15:18 |
Hi Djemal!
At first: it sho
|
#11 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Djemal!
At first: it should be possible to write 2e-2 instead of 2*pow(10.,-2). This would a) make the expression simpler and b) reduce the computation time (because 2*pow(10,-2) will be computed for every cell. Have you tried to make the radius (which is 2 orders of magnitude smaller than the coordinates of the midpoint) much larger? I mean: how large are your cells? With that difference in magnitudes it might be possible, that no cell-center fits your condition Bernhard ---- Hi Thomas! Did you download it using svn or via the web-browser? Because I was weondering why there was any need to rename the C-files? Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
March 4, 2008, 05:29 |
Hi Bernhard an Djemai,
than
|
#12 |
New Member
Thomas Sponfeldner
Join Date: Mar 2009
Posts: 9
Rep Power: 17 |
Hi Bernhard an Djemai,
thanks for your help. It works now. I had some problems with my browser, therefore I had to rename all the files. But after downloading them from anonther pc the files remained unchanged and wiki-instructions worked fine. Regards, Thomas |
|
March 4, 2008, 08:52 |
Hi Bernhard and Djemai,
it
|
#13 |
New Member
Thomas Sponfeldner
Join Date: Mar 2009
Posts: 9
Rep Power: 17 |
Hi Bernhard and Djemai,
it works now. I had some problems with my browser therefore I had to change the filenames. But using another pc the files remained unchanged and wiki instructions worked fine. Thanks for your help and the quick replies. Regards, Thomas |
|
March 4, 2008, 11:19 |
Hi Thomas!
With SVN-Archive
|
#14 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Thomas!
With SVN-Archives the browser is only good for looking at the stuff. Use the svn-command to actually "download" it. Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
March 7, 2008, 05:12 |
Hi Bernhard !
thank you, I un
|
#15 |
Member
merrouche djemai
Join Date: Mar 2009
Location: ain-oussera, djelfa, algeria
Posts: 46
Rep Power: 17 |
Hi Bernhard !
thank you, I understand and it works. Djemai |
|
May 18, 2008, 04:28 |
I used funkySetFields to creat
|
#16 |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
I used funkySetFields to create a spherical initial condition:
funkySetFields . . -field gamma -expression 1 -condition "pos().x*pos().x + pos().y*pos().y <= 1" -time 0 I didn't had the chance to say if the condition is right, because there was this error: --> FOAM FATAL ERROR : This mesh contains patches of type empty but is not 1D or 2D by virtue of the fact that the number of faces of this empty patch is not divisible by the number of cells. From function emptyFvPatchField<type>::updateCoeffs() in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 1 Looks like there is a problem with the mesh. Does anybody know, what went wrong? blockMeshDict
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
|
May 18, 2008, 08:11 |
Hi Sebastian,
You can read th
|
#17 |
Super Moderator
Takuya OSHIMA
Join Date: Mar 2009
Location: Niigata City, Japan
Posts: 518
Blog Entries: 1
Rep Power: 20 |
Hi Sebastian,
You can read the error message straightforwardly: patch (1 2 14 13) is missing in leftAndBottom. And don't forget to scale the expression given to FSF, e. g. pos().x*pos().x + pos().y*pos().y <= 0.02*0.02, since there's convertToMeter 0.01; in your blockMeshDict. Takuya |
|
May 18, 2008, 13:56 |
Hello Takuya.
Of course. Th
|
#18 |
Senior Member
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20 |
Hello Takuya.
Of course. That solved the problem. But the simulation is not running as planned. As this has nothing to do with funkySetFields I will talk about it in another thread the next days. Thanks. S.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!" |
|
May 29, 2008, 07:16 |
Hi all
Lately I have been w
|
#19 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi all
Lately I have been working with waves over submerged bars, and I have experienced a problem when initializing the gamma-field. I am using hex-cells and initializing with setFields (SF), but as I can see that the problem would arise from using funkySetField (FSF) as well. The problem is seen in the following figure: SF and FSF initializes based on the cell center coordinate, thus a cell might be partly full but the fraction of gamma is only set to either 0 or 1, which results in the step-like feature of the attached figure. I am considering making a routine - even though it might be some time into the future, as its priority is very low - which calculates the wet and dry fractions of these partially full cells. This would enable an initialization of the surface, which is perfectly flat and thus the fast moving surface waves, which I am struggling with at the moment, will be history. Thus my questions are two-fold: 1. Would people be interested in such a tool? 2. The mesh generator has some routine to calculate the cell volumes based on an arbitrary shape. Could any of you point me to where it happens, as I am not strong in calculating the volume of arbitrarily shaped cells. Best regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
May 29, 2008, 09:35 |
Hi Niels!
Maybe a quick fix
|
#20 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Niels!
Maybe a quick fix could be the following expression in funkySetFields (havn't got the time to try this out so the syntax might be slightly wrong): "average(fpos().y < 0 ? 1 : 0)" This constructs a face-field according to the criterium and then creates the cell field by averaging the values on the faces. This should smoothen things out a bit All the functions are described on http://openfoamwiki.net/index.php/Co...funkySetFields Bernhard PS: Let me know if you have any problems. This part of FSF is not too well tested
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC and funkySetFields married and got a kid named swak4Foam | gschaider | OpenFOAM Community Contributions | 169 | August 10, 2023 10:01 |
[swak4Foam] how to use funkySetFields function in muliregion case | bryant_k | OpenFOAM Community Contributions | 15 | October 15, 2021 03:50 |
[swak4Foam] funkySetFields and funkySetBoundaryFields | zxj160 | OpenFOAM Community Contributions | 19 | February 14, 2018 20:07 |
[swak4Foam] funkySetFields: problem with processor boundary | nmikhailov | OpenFOAM Community Contributions | 4 | May 26, 2015 10:48 |
[swak4Foam] numerical beach with funkySetFields?! | maxonline | OpenFOAM Community Contributions | 6 | June 17, 2011 05:59 |