|
[Sponsors] |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 28, 2010, 05:38 |
Mixed BC - Heat transfer
|
#121 |
Member
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17 |
I am working with heat transfer in solid material and using laplacianFoam. I have the possibility to impose
1) fixed temperature and 2) fixed temperature gradient (fixed heat flux (dT/dn)_w = q_w/k; q_w is given, k is the conductivity of the solid material) on the walls. Often it is needed to set the heat flux on a boundary given by the heat transfer coefficient (h) and the outside temperature(T_inf) 3) (dT/dn)_w=h/k (T_w -T_inf). h and T_inf are given, k is the conductivity of the solid material and T_w is the wall temperature (Varies during the computations and along BC patch). Will it be possible to use groovyBC? If yes, do you have any hints? regards Bjorn |
|
April 12, 2010, 08:33 |
|
#122 |
New Member
Join Date: May 2009
Posts: 21
Rep Power: 17 |
Hi all,
I have a similar question, how is it possible to use groovyBC for a constant heat flux q, can maybe anybody give a quick example? Thanks a lot!! Thomas |
|
April 12, 2010, 08:50 |
|
#123 |
Member
Bjorn H. Hjertager
Join Date: Mar 2009
Posts: 72
Rep Power: 17 |
Hi Thomas,
If you want to impose constant flux in laplacianFoam you can use fixedGradient as indicated in point 2) above. This applies also for all solvers where the energy (enthalpy) equation is solved for. In these solvers the fixedGradient will be the constant heat flux. rgds Bjorn |
|
April 13, 2010, 21:38 |
|
#124 |
Senior Member
Michael Jaworski
Join Date: Mar 2009
Location: Champaign, IL, USA
Posts: 126
Rep Power: 17 |
I have a solver that keeps the conductivity as a separate field for temperature variable material properties.
I use the following with GroovyBC to make a specified heat flux boundary: Code:
gradientExpression "(pos().x<strikePt)? 1/k*(peak*exp((pos().x-strikePt)/decayPFZ)+offset-epsilon*Aeff*sigma*(pow((T+273),4)-pow(T0,4))-massFlux*h_fg*Aeff): 1/k*(peak*exp(-(pos().x-strikePt)/decayL)+offset-epsilon*Aeff*sigma*(pow((T+273),4)-pow(T0,4))-massFlux*h_fg*Aeff)"; valueExpression "210"; // gradientExpression "250*sin(pos().x/decay*pi)+250"; fractionExpression "0"; -Mike |
|
April 28, 2010, 15:31 |
|
#125 |
New Member
Evren
Join Date: Mar 2010
Posts: 20
Rep Power: 16 |
Hi,
I use OF 1.6, groovyBC for OF1.6 and bison 2.3 (due to incompatibility of OS in compute servers and bison 2.4.1). I could compile groovyBC by commenting out groovyBCFvPatchFields.C in files, otherwise i get some errors. Finally, I got the test case "groovyWaveTank" from openfoamwiki. However, when I run <setFields>, I get the following error Reading setFieldsDict Setting field default values Setting volScalarField gamma Setting volVectorField U Cannot find 'value' entry on patch inlet of field U in file "/home/doncamillo/ebayrakt/OpenFOAM/ebayrakt-1.6/run/run/groovyWaveTank/0/U" which is required to set the values of the generic patch field. (Actual type groovyBC) Please add the 'value' entry to the write function of the user-defined boundary-condition or link the boundary-condition into libfoamUtil.so file: /home/doncamillo/ebayrakt/OpenFOAM/ebayrakt-1.6/run/run/groovyWaveTank/0/U::inlet from line 26 to line 29. From function genericFvPatchField<Type>::genericFvPatchField(con st fvPatch&, const Field<Type>&, const dictionary&) in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 72. FOAM exiting Has someone experienced a similar problem or I am the lucky guy? :-) looking forward to some enlightening ideas... Cheers, Evren |
|
April 28, 2010, 17:43 |
|
#126 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I think you'll have to fix these first. What kind of errors? Bernhard |
||
May 7, 2010, 10:23 |
|
#127 |
New Member
yannH
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
Hi Bernhard and everyone,
Firstly congratulations for your work on groovyBC ! I'm actually working on breaking waves and I use FunkySetFields to initiate an unsteady stokes waves (3rd order), and using variable is not possible, so I spend a lot of time calculating expressions, re-writing it etc... So you're gonna ask what's the purpose in a topic about groovyBC ? I would like to have variables like in groovyBC for my conditions like : interfaceAlpha { field alpha1 0; expression "1"; condition "pos().y <= d + A*cos(k*pos().x) + 0.5*k*A*A*cos(2*(k*pos().x)) + 0.375*k*k*A*A*A*cos(3*(k*pos().x)) " ? 1 : 1; variables "A = 0.1 ; L=20 ; k = 2*pi/L ; d = 15;"; } I've already looked on groovyBC files to "copy" functions for variables into FunkySetFields files, but I'm not an expert of C++. I know my questions looks like hua's one on reply #13, but is there an easy way to implement it or can you give me the first step to do it? best regards, Yann |
|
May 10, 2010, 06:19 |
|
#128 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
http://openfoamwiki.net/index.php/Co...ctionary_usage Of course creating unneeded files on disc is not the best solution, but recent versions of FSF cache fields in memory so the solution would be to "create" fields in the dictionary that are not written to disc. This only requires minor modifications and if a bugReport/featureRequest torns up on http://sourceforge.net/apps/mantisbt...status_id%3D-2 I might find time to do it Bernhard |
||
May 10, 2010, 12:00 |
|
#129 |
New Member
yannH
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
I did with the dictionary usage. I saw it before but I haven't tought to use it like that! Nevertheless it would be better not creating files on the disc for sure.. anyway, thanks bernhard
best regards, Yann |
|
May 14, 2010, 12:40 |
|
#130 |
Senior Member
|
Anyone compile groovy and funky on an SGI Altix ICE 8200? I am trying to build using icpc 11.1, bison 2.1, flex 2.5.31, but am getting a bunch of errors. After reading through this thread, I think it is the version of bison. I've put in a request for the admins to upgrade to at least bison 2.3. Typical errors are, e.g.,
----- 243 harold-l1> wmake libso /bin/sh: /usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/wmake/rules/linux64Icc/wmkdep: No such file or directory /bin/sh: /usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/wmake/rules/linux64Icc/wmkdep: No such file or directory /bin/sh: /usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/wmake/rules/linux64Icc/wmkdep: No such file or directory /bin/sh: /usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/wmake/rules/linux64Icc/wmkdep: No such file or directory /bin/sh: /usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/wmake/rules/linux64Icc/wmkdep: No such file or directory /bin/sh: /usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/wmake/rules/linux64Icc/wmkdep: No such file or directory SOURCE=PatchResult.C ; icpc -DIntel -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=1731 -wd584,654,819,1125,1476,1505,1572 -ansi-alias -O3 -fno-alias -fargument-noalias-global -unroll0 -DNoRepository -IMake/linux64IccDPOpt -DFOAM_DEV -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -IlnInclude -I. -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64IccDPOpt/PatchResult.o SOURCE=PatchValueExpressionParser.yy ; rm -f Make/linux64IccDPOpt/PatchValueExpressionParser.C Make/linux64IccDPOpt/PatchValueExpressionParser.tab.hh; bison -ra -v -d $SOURCE ; mv *.tab.cc Make/linux64IccDPOpt/PatchValueExpressionParser.C ; mv *.tab.hh Make/linux64IccDPOpt/PatchValueExpressionParser.tab.hh ; mv *.hh Make/linux64IccDPOpt ; icpc -DIntel -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=1731 -wd584,654,819,1125,1476,1505,1572 -ansi-alias -O3 -fno-alias -fargument-noalias-global -unroll0 -DNoRepository -IMake/linux64IccDPOpt -DFOAM_DEV -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -IlnInclude -I. -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c Make/linux64IccDPOpt/PatchValueExpressionParser.C -o Make/linux64IccDPOpt/PatchValueExpressionParser.o SOURCE=PatchValueExpressionLexer.ll ; rm Make/linux64IccDPOpt/PatchValueExpressionLexer.C ; flex -f $SOURCE ; mv *.c Make/linux64IccDPOpt/PatchValueExpressionLexer.C ; icpc -DIntel -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=1731 -wd584,654,819,1125,1476,1505,1572 -ansi-alias -O3 -fno-alias -fargument-noalias-global -unroll0 -DNoRepository -IMake/linux64IccDPOpt -DFOAM_DEV -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/finiteVolume/lnInclude -IlnInclude -I. -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/usr/cta/unsupported/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c Make/linux64IccDPOpt/PatchValueExpressionLexer.C -o Make/linux64IccDPOpt/PatchValueExpressionLexer.o rm: cannot remove `Make/linux64IccDPOpt/PatchValueExpressionLexer.C': No such file or directory lnInclude/PatchValueExpressionDriver.H(68): error: incomplete type is not allowed YY_DECL; ^ lnInclude/PatchValueExpressionDriver.H(68): error: identifier "yylval" is undefined YY_DECL; ^ lnInclude/PatchValueExpressionDriver.H(68): error: expected a ")" YY_DECL; ^ PatchValueExpressionParser.tab.cc(504): error: expression must have (pointer-to-) function type yylooka = yylex (&yylval, &yylloc, driver); ^ PatchValueExpressionParser.yy(650): error: incomplete type is not allowed void pve::PatchValueExpressionParser::error (const pve::PatchValueExpressionParser::location_type& l,const std::string& m) ^ PatchValueExpressionParser.yy(650): error: incomplete type is not allowed void pve::PatchValueExpressionParser::error (const pve::PatchValueExpressionParser::location_type& l,const std::string& m) ^ PatchValueExpressionParser.yy(652): error: identifier "driver" is undefined driver.error (l, m); ^ lnInclude/PatchValueExpressionDriver.H(68): error: incomplete type is not allowed YY_DECL; ^ lnInclude/PatchValueExpressionDriver.H(68): error: identifier "yylval" is undefined YY_DECL; ^ lnInclude/PatchValueExpressionDriver.H(68): error: expected a ")" YY_DECL; ^ lex.ve.c(9101): error: incomplete type is not allowed YY_DECL ^ lex.ve.c(9101): error: variable "pvelex" has already been defined YY_DECL ^ lex.ve.c(9101): error: expected a ")" YY_DECL ^ lex.ve.c(9102): error: expected a ";" { ^ lex.ve.c(9126): warning #12: parsing restarts here after previous syntax error (yy_start) = 1; /* first start state */ ....... |
|
May 14, 2010, 14:09 |
|
#131 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I'm afraid your analysis is right (I remember this YY_DECL-thing and I think it was the same thing that caused the problems with funkySetFields). The best thing in this situation would be to cheat: bypass the old bison: Take the files generated on a machine with an up-to-date bison, put them onto the SGI and modify Make/files accordingly. There are some scripts in funkySetFields that do that (actually it's quite trivial), but obviously they'll have to be adapted (for a one-off you'll be faster doing this by hand) Bernhard |
||
May 31, 2010, 08:40 |
|
#132 |
Senior Member
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16 |
I tried to compile this library but I have this message during compilation:
wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file PatchResult.C Making dependency list for source file PatchValueExpressionParser.yy could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionParser.yy Making dependency list for source file PatchValueExpressionLexer.ll could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionLexer.ll Making dependency list for source file PatchValueExpressionDriver.C could not open file PatchValueExpressionParser.tab.hh for source file PatchValueExpressionDriver.C Making dependency list for source file groovyBCFvPatchFields.C could not open file PatchValueExpressionParser.tab.hh for source file groovyBCFvPatchFields.C Making dependency list for source file groovyBCPointPatchFields.C could not open file MixedPointPatchField.H for source file groovyBCPointPatchFields.C could not open file PatchValueExpressionParser.tab.hh for source file groovyBCPointPatchFields.C could not open file PointPatchFieldMapper.H for source file groovyBCPointPatchFields.C SOURCE=PatchResult.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/PatchResult.o PatchResult.C: In member function ‘void Foam::PatchResult::uglyDelete()’: PatchResult.C:97: warning: deleting ‘void*’ is undefined SOURCE=PatchValueExpressionParser.yy ; rm -f Make/linuxGccDPOpt/PatchValueExpressionParser.C Make/linuxGccDPOpt/PatchValueExpressionParser.tab.hh; bison -ra -v -d $SOURCE ; mv *.tab.cc Make/linuxGccDPOpt/PatchValueExpressionParser.C ; mv *.tab.hh Make/linuxGccDPOpt/PatchValueExpressionParser.tab.hh ; mv *.hh Make/linuxGccDPOpt ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c Make/linuxGccDPOpt/PatchValueExpressionParser.C -o Make/linuxGccDPOpt/PatchValueExpressionParser.o In file included from Make/linuxGccDPOpt/location.hh:44, from PatchValueExpressionParser.tab.hh:65, from PatchValueExpressionParser.tab.cc:61: position.hh: In function ‘bool pve:perator==(const pve:osition&, const pve:osition&)’: position.hh:136: warning: suggest parentheses around && within || PatchValueExpressionParser.tab.cc: In member function ‘unsigned char pve::PatchValueExpressionParser::yytranslate_(int) ’: PatchValueExpressionParser.tab.cc:4941: warning: use of old-style cast SOURCE=PatchValueExpressionLexer.ll ; rm Make/linuxGccDPOpt/PatchValueExpressionLexer.C ; flex -f $SOURCE ; mv *.c Make/linuxGccDPOpt/PatchValueExpressionLexer.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IMake/linuxGccDPOpt -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/acconcia/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c Make/linuxGccDPOpt/PatchValueExpressionLexer.C -o Make/linuxGccDPOpt/PatchValueExpressionLexer.o rm: impossibile rimuovere `Make/linuxGccDPOpt/PatchValueExpressionLexer.C': Nessun file o directory /bin/sh: flex: not found mv: impossibile fare stat di `*.c': Nessun file o directory g++: Make/linuxGccDPOpt/PatchValueExpressionLexer.C: Nessun file o directory g++: no input files make: *** [Make/linuxGccDPOpt/PatchValueExpressionLexer.o] Errore 1 it's correct? |
|
May 31, 2010, 08:53 |
|
#133 |
New Member
yannH
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
I think you have to install 'flex' first
|
|
May 31, 2010, 09:09 |
|
#134 |
Senior Member
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16 |
Thanks
What flex is? |
|
May 31, 2010, 09:30 |
|
#135 |
New Member
yannH
Join Date: Feb 2010
Posts: 26
Rep Power: 16 |
I suggest you to search in the thread before posting, have a look at post #120. Otherwise, flex is a fast lexical analyser generator, you need it to compile groovyBC. ou can easily get it if you use a debian distribution by synaptic for example
|
|
May 31, 2010, 09:42 |
|
#136 |
Senior Member
Daniele
Join Date: Feb 2010
Posts: 134
Rep Power: 16 |
You are right, i serched but non all posts, thanks you
|
|
June 5, 2010, 05:14 |
problem compiling groovyBC
|
#137 |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi,
I also have a problem in compiling groovyBC. I am using OF 1.6.x. I have bison (GNU Bison) 2.4.1 and flex 2.5.35. I copied all the files of groovyBC from here https://openfoam-extend.svn.sourcefo...ries/groovyBC/. and put it into my run folder. When I compile it I get the following error: root@chrisilinux:~/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/groovyBC# wmake libso wmakeLnInclude: linking include files to ./lnInclude make: *** Keine Regel vorhanden, um das Target »PatchValueExpressionDriver.dep«, benötigt von »Make/linuxGccDPOpt/dependencies«, zu erstellen. Schluss. root@chrisilinux:~/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/groovyBC# I yet tried compiling with out coomented groovyBCPointPatchFields.C, but it did not help. Can anyone help me compilling groovyBC? Thanks in advance. Regards Chrisi |
|
June 7, 2010, 05:41 |
|
#138 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
June 14, 2010, 13:50 |
|
#139 | |
Member
Ovie Doro
Join Date: Jul 2009
Posts: 99
Rep Power: 17 |
Quote:
Please could you be more specific on how this can be done? Some of us dont just have a clue. I am trying to compile groovyBC on a cluster and the bison is not up to date. So I need help on implementing this bypass. Thanks |
||
June 14, 2010, 15:00 |
|
#140 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
1. bison/flex translates the grammar into a .c and .h file 2. the c-compiler compiles those files Usually an out of date bison produces in step 1 a C-file that doesn't compile in step 2. In groovyBC and funkySetFields both steps are done by one rule. So the idea is to compile groovyBC on machine A with a working bison. Then copy the generated C/H-files to machine B. Modify Make/files there to skip bison/flex and directly compile the C-files. For an example have a look at the sources of funkySetFields. The script getGenerated.sh is basically what should be done on machine A (filenames are slightly different). Script insertGenerated.sh is what should be done on machine B. I think the scripts make pretty clear what should be done. If you don't understand them (which is OK, your job is CFD) go to your sysadmin. If your sysadmin has a problem with them: get a new sysadmin Bernhard |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Ship resistance shows wiggles when using Overset mesh and dynamic mesh in Fluent | Qingsong | FLUENT | 2 | March 21, 2022 16:08 |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
[ICEM] Dynamic mesh setup with ICEM | David121284 | ANSYS Meshing & Geometry | 0 | April 11, 2014 05:19 |
Dynamic Mesh "Shadow Wall" | thezack | FLUENT | 0 | June 4, 2013 23:09 |
dynamic mesh for drop interface | IndrajitW | FLUENT | 0 | March 30, 2013 09:03 |