|
[Sponsors] |
[swak4Foam] need funkysetfields to creat a droplet |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 1, 2012, 17:58 |
need funkysetfields to creat a droplet
|
#1 |
Member
Join Date: Mar 2012
Posts: 51
Rep Power: 14 |
Hi all,
im new here and im new in OpenFOAM too... im tryin to simulate a water droplet sliding on an inclined plane. I have read that i need either funkysetfields or swak4foam to creat a droplet. I think that funkysetfields doesnt work on OF 2.1 so i tried to install swak4foam. I downloaded the file and installed it but im not sure if its installed correctly. Now i wanna try it on the dam tutorial but i cant find the swak4foam dict. in system... any advices would be appreciated.. |
|
March 1, 2012, 18:42 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
1. Download swak4Foam (usually this is done via SVN) 2. In the directory swak4Foam executed ./Allwmake IF step 2 finished without problems (if you're not sure: just rerun ./Allwmake. The output should be much shorter) then funkySetFields is installed (amongst a number of other things). Just use it the way it is described on the Wiki-page for the "old" funkySetFields. Don't know what you mean with the swak4Foam-dict. A dictionary for FSF if used in dictionary-mode? There is none in the regular tutorials. Have a look at the existing examples and with some very basic mathematics you can write one yourself. Ah. And in my talk at the Workshop in PennState I used it as an example. The slides (and examples) are linked at the swak-Wiki-page. Slide 36 is the one you're looking for |
||
March 1, 2012, 18:48 |
|
#3 |
Member
Join Date: Mar 2012
Posts: 51
Rep Power: 14 |
I'v taken a look at the slides before ... and exactly this funkysetfieldsDict. ... where can i find it ?
Last edited by callahance; March 1, 2012 at 19:10. |
|
March 1, 2012, 19:40 |
|
#4 |
Member
Join Date: Mar 2012
Posts: 51
Rep Power: 14 |
Here's what i get from ./Allwmake :
Bison is version 2.4.1 No 'swakConfiguration'. Python etc won't work OpenFOAM-version: Major 2 Minor 1 Patch 0 No change to Libraries/swak4FoamParsers/foamVersion4swak.H SOURCE=GlobalVariablesRepository.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -IMake/linuxGccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/sampling/lnInclude -I/opt/openfoam210/src/triSurface/lnInclude -I/opt/openfoam210/src/lagrangian/basic/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/GlobalVariablesRepository.o In file included from GlobalVariablesRepository.H:45:0, from GlobalVariablesRepository.C:34: ExpressionResult.H:49:2: error: #error "This swak4Foam-version is only used for the 1.x-versions of OpenFOAM. For higher versions there is a special branch" make: *** [Make/linuxGccDPOpt/GlobalVariablesRepository.o] Error 1 SOURCE=groovyBCFvPatchFields.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -IMake/linuxGccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I../swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/groovyBCFvPatchFields.o In file included from ../swak4FoamParsers/lnInclude/PatchValueExpressionDriver.H:50:0, from groovyBCFvPatchField.H:48, from groovyBCFvPatchFields.H:37, from groovyBCFvPatchFields.C:36: ../swak4FoamParsers/lnInclude/ExpressionResult.H:49:2: error: #error "This swak4Foam-version is only used for the 1.x-versions of OpenFOAM. For higher versions there is a special branch" In file included from groovyBCFvPatchField.H:48:0, from groovyBCFvPatchFields.H:37, from groovyBCFvPatchFields.C:36: ../swak4FoamParsers/lnInclude/PatchValueExpressionDriver.H:60:45: fatal error: PatchValueExpressionParser.tab.hh: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/groovyBCFvPatchFields.o] Error 1 SOURCE=manipulateField.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I../swak4FoamParsers/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/sampling/lnInclude -I/opt/openfoam210/src/triSurface/lnInclude -I/opt/openfoam210/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/manipulateField.o In file included from manipulateField.C:30:0: ../swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18:45: fatal error: FieldValueExpressionParser.tab.hh: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/manipulateField.o] Error 1 SOURCE=patch/patchAverageFunctionObject/patchAverageFunctionObject.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/sampling/lnInclude -I/opt/openfoam210/src/triSurface/lnInclude -I/opt/openfoam210/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/patchAverageFunctionObject.o In file included from lnInclude/simpleFunctionObject.H:40:0, from lnInclude/simpleDataFunctionObject.H:40, from lnInclude/timelineFunctionObject.H:40, from lnInclude/patchFunctionObject.H:40, from lnInclude/patchFieldFunctionObject.H:40, from patch/patchAverageFunctionObject/patchAverageFunctionObject.H:40, from patch/patchAverageFunctionObject/patchAverageFunctionObject.C:28: /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H: In static member function ‘static Foam::autoPtr<Foam::functionObject> Foam::functionObject::adddictionaryConstructorToTa ble<functionObjectType>::New(const Foam::word&, const Foam::Time&, const Foam::dictionary&) [with functionObjectType = Foam:atchAverageFunctionObject]’: /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H:91:1: instantiated from ‘Foam::functionObject::adddictionaryConstructorToT able<functionObjectType>::adddictionaryConstructor ToTable(const Foam::word&) [with functionObjectType = Foam:atchAverageFunctionObject]’ patch/patchAverageFunctionObject/patchAverageFunctionObject.C:44:1: instantiated from here /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H:84:9: error: cannot allocate an object of abstract type ‘Foam:atchAverageFunctionObject’ patch/patchAverageFunctionObject/patchAverageFunctionObject.H:51:7: note: because the following virtual functions are pure within ‘Foam:atchAverageFunctionObject’: /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H:152:22: note: virtual bool Foam::functionObject::execute(bool) /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H:84:9: warning: control reaches end of non-void function [-Wreturn-type] make: *** [Make/linuxGccDPOpt/patchAverageFunctionObject.o] Error 1 SOURCE=general/swakExpressionFunctionObject.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I../simpleFunctionObjects/lnInclude -I/home/callahance/OpenFOAM/callahance-2.1.0/Libraries/simpleFunctionObjects/lnInclude -I../swak4FoamParsers/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I/opt/openfoam210/src/sampling/lnInclude -I/opt/openfoam210/src/triSurface/lnInclude -I/opt/openfoam210/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/swakExpressionFunctionObject.o In file included from ../swak4FoamParsers/lnInclude/CommonValueExpressionDriver.H:53:0, from general/swakExpressionFunctionObject.H:42, from general/swakExpressionFunctionObject.C:28: ../swak4FoamParsers/lnInclude/ExpressionResult.H:49:2: error: #error "This swak4Foam-version is only used for the 1.x-versions of OpenFOAM. For higher versions there is a special branch" In file included from ../swak4FoamParsers/lnInclude/CommonValueExpressionDriver.H:428:0, from general/swakExpressionFunctionObject.H:42, from general/swakExpressionFunctionObject.C:28: ../swak4FoamParsers/lnInclude/CommonValueExpressionDriverI.H: In member function ‘void Foam::CommonValueExpressionDriver::error(const Location&, const string&)’: ../swak4FoamParsers/lnInclude/CommonValueExpressionDriverI.H:724:15: error: expected unqualified-id before ‘::’ token ../swak4FoamParsers/lnInclude/CommonValueExpressionDriverI.H:724:15: error: expected ‘;’ before ‘::’ token In file included from ../simpleFunctionObjects/lnInclude/simpleFunctionObject.H:40:0, from ../simpleFunctionObjects/lnInclude/simpleDataFunctionObject.H:40, from ../simpleFunctionObjects/lnInclude/timelineFunctionObject.H:40, from general/swakExpressionFunctionObject.H:40, from general/swakExpressionFunctionObject.C:28: /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H: In static member function ‘static Foam::autoPtr<Foam::functionObject> Foam::functionObject::adddictionaryConstructorToTa ble<functionObjectType>::New(const Foam::word&, const Foam::Time&, const Foam::dictionary&) [with functionObjectType = Foam::swakExpressionFunctionObject]’: /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H:91:1: instantiated from ‘Foam::functionObject::adddictionaryConstructorToT able<functionObjectType>::adddictionaryConstructor ToTable(const Foam::word&) [with functionObjectType = Foam::swakExpressionFunctionObject]’ general/swakExpressionFunctionObject.C:44:1: instantiated from here /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H:84:9: error: cannot allocate an object of abstract type ‘Foam::swakExpressionFunctionObject’ general/swakExpressionFunctionObject.H:53:7: note: because the following virtual functions are pure within ‘Foam::swakExpressionFunctionObject’: /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H:152:22: note: virtual bool Foam::functionObject::execute(bool) /opt/openfoam210/src/OpenFOAM/lnInclude/functionObject.H:84:9: warning: control reaches end of non-void function [-Wreturn-type] make: *** [Make/linuxGccDPOpt/swakExpressionFunctionObject.o] Error 1 SOURCE=expressionToCell.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I../swak4FoamParsers/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/expressionToCell.o In file included from expressionToCell.C:39:0: ../swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18:45: fatal error: FieldValueExpressionParser.tab.hh: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/expressionToCell.o] Error 1 SOURCE=expressionSource.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -I../swak4FoamParsers/lnInclude -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/expressionSource.o In file included from expressionSource.H:45:0, from expressionSource.C:33: ../swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18:45: fatal error: FieldValueExpressionParser.tab.hh: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/expressionSource.o] Error 1 SOURCE=groovyTotalPressureFvPatchScalarField.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -IMake/linuxGccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I../groovyBC/lnInclude/ -I../swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/groovyTotalPressureFvPatchScalarField.o In file included from ../swak4FoamParsers/lnInclude/PatchValueExpressionDriver.H:50:0, from groovyTotalPressureFvPatchScalarField.H:47, from groovyTotalPressureFvPatchScalarField.C:33: ../swak4FoamParsers/lnInclude/ExpressionResult.H:49:2: error: #error "This swak4Foam-version is only used for the 1.x-versions of OpenFOAM. For higher versions there is a special branch" In file included from groovyTotalPressureFvPatchScalarField.H:47:0, from groovyTotalPressureFvPatchScalarField.C:33: ../swak4FoamParsers/lnInclude/PatchValueExpressionDriver.H:60:45: fatal error: PatchValueExpressionParser.tab.hh: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/groovyTotalPressureFvPatchScalarField.o] Error 1 SWAK_PYTHON_INCLUDE not defined .... no Python-Integration SOURCE=funkySetFields.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -IMake/linuxGccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/funkySetFields.o In file included from funkySetFields.C:41:0: ../../Libraries/swak4FoamParsers/lnInclude/FieldValueExpressionDriver.H:18:45: fatal error: FieldValueExpressionParser.tab.hh: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/funkySetFields.o] Error 1 SOURCE=funkySetBoundaryField.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -IMake/linuxGccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/funkySetBoundaryField.o In file included from ../../Libraries/swak4FoamParsers/lnInclude/PatchValueExpressionDriver.H:50:0, from funkySetBoundaryField.C:41: ../../Libraries/swak4FoamParsers/lnInclude/ExpressionResult.H:49:2: error: #error "This swak4Foam-version is only used for the 1.x-versions of OpenFOAM. For higher versions there is a special branch" In file included from funkySetBoundaryField.C:41:0: ../../Libraries/swak4FoamParsers/lnInclude/PatchValueExpressionDriver.H:60:45: fatal error: PatchValueExpressionParser.tab.hh: No such file or directory compilation terminated. make: *** [Make/linuxGccDPOpt/funkySetBoundaryField.o] Error 1 make: `/home/callahance/OpenFOAM/callahance-2.1.0/platforms/linuxGccDPOpt/bin/replayTransientBC' is up to date. SOURCE=funkyDoCalc.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-100 -IMake/linuxGccDPOpt -I/opt/openfoam210/src/finiteVolume/lnInclude -I/opt/openfoam210/src/meshTools/lnInclude -I../../Libraries/swak4FoamParsers/lnInclude/ -IlnInclude -I. -I/opt/openfoam210/src/OpenFOAM/lnInclude -I/opt/openfoam210/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/funkyDoCalc.o In file included from ../../Libraries/swak4FoamParsers/lnInclude/CommonValueExpressionDriver.H:53:0, from funkyDoCalc.C:41: ../../Libraries/swak4FoamParsers/lnInclude/ExpressionResult.H:49:2: error: #error "This swak4Foam-version is only used for the 1.x-versions of OpenFOAM. For higher versions there is a special branch" In file included from ../../Libraries/swak4FoamParsers/lnInclude/CommonValueExpressionDriver.H:428:0, from funkyDoCalc.C:41: ../../Libraries/swak4FoamParsers/lnInclude/CommonValueExpressionDriverI.H: In member function ‘void Foam::CommonValueExpressionDriver::error(const Location&, const string&)’: ../../Libraries/swak4FoamParsers/lnInclude/CommonValueExpressionDriverI.H:724:15: error: expected unqualified-id before ‘::’ token ../../Libraries/swak4FoamParsers/lnInclude/CommonValueExpressionDriverI.H:724:15: error: expected ‘;’ before ‘::’ token make: *** [Make/linuxGccDPOpt/funkyDoCalc.o] Error 1 |
|
March 2, 2012, 04:42 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Alternative is to copy paste the dict from the slide (maybe you'll need a header, but what is on the slide is all that is required) |
||
March 2, 2012, 04:51 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
How to get the version for 2.x (either svn or hg) is described in http://openfoamwiki.net/index.php/Co...am#Downloading |
||
March 2, 2012, 05:30 |
|
#7 |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17 |
also make sure you got all the necessary libraries and applications like: bison; python; flex and the other OF requirements.
and remember not to install it as root.. it makes it harder to compile |
|
March 2, 2012, 06:35 |
|
#8 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
The usual cause for failure "missing bison" is checked for by the compile-script since the last release. And he has that according to his output
|
|
March 2, 2012, 12:59 |
|
#9 | |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17 |
Quote:
Code:
the compiler generators =bison= and =flex= - =swak4Foam= is known to work with =bison= version 2.3 and higher. Lower versions *may* work. If it works with a lower version please report it |
||
March 2, 2012, 14:00 |
|
#10 |
Member
Join Date: Mar 2012
Posts: 51
Rep Power: 14 |
first thanks for the replies ... i'll try to install the swak4foam for the 2.1 version and then i'll try to figure the droplet out .... one other question : in interfoam usually g is a constant and in one direction . How can i make g (gravity) a function of time ? like i want gravity = 9.81*sin(t) in z direction where t corresponds to time
|
|
March 4, 2012, 08:37 |
|
#11 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
March 4, 2012, 09:03 |
|
#12 | |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 17 |
Quote:
Thanks for checking! gj with the army knife! |
||
March 4, 2012, 17:43 |
|
#13 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
libs ( "libswakFunctionObjects.so" ); functions ( gravityDirection { type expressionField; fieldName gDirection; autowrite true; variables ( "duration=5;" "maxAngle=45;" "angle=pi/180*(time()<duration ? time()/duration*maxAngle : maxAngle);" ); expression "-9.81*vector(sin(angle),cos(angle),0)"; outputControl timeStep; outputInterval 1; } setGH { type manipulateField; outputControl timeStep; outputInterval 1; fieldName gh; expression "gDirection & pos()"; mask "true"; } setGHF { type manipulateField; outputControl timeStep; outputInterval 1; fieldName ghf; expression "interpolate(gDirection) & fpos()"; mask "surf(true)"; } ); |
||
May 21, 2012, 08:51 |
|
#14 |
New Member
Tom Schmitz
Join Date: Mar 2011
Posts: 19
Rep Power: 15 |
Hey Bernhard,I would like to simulate somewave propagation with the potentialWaveFoam solver. I set the internal field just like the one in the tutorial with funkySetFields. but now i want to simulate a continuous wave.
My first idea was to write a python script so that OpenFoam will stop after every time step, run funkySetFields and then start again the solver and so on.. But this is very slow. Now i read about manipulateField and want to try it but somehow it doesn't work. I don't get an error but i only get one period. Do you have an idea where the mistake is? I added this to the controlDict: libs ( "libswakFunctionObjects.so" "libOpenFOAM.so" "libconvectiveOutlet.so"); functions ( setPhi { type manipulateField; outputControl timeStep; outputInterval 1; fieldName phi; expression "-1*cos(1000*(time()+1.67981e-8))"; condition "pow(pos().x-0.015,2) + pow(pos().y,2) < pow(0.0015,2)"; //mask "true"; keepPatches 1; } setPhi_0 { type manipulateField; outputControl timeStep; outputInterval 1; fieldName phi_0; expression "-1*cos(1000*time())"; condition "pow(pos().x-0.015,2) + pow(pos().y,2) < pow(0.0015,2)"; //mask "true"; keepPatches 1; } ); I also tried it with mask "true"; (No idea what that does) |
|
May 21, 2012, 15:00 |
|
#15 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Concerning condition/mask: "condition" is not used. "mask" is what "condition" is in funkySetFields. I don't quite understand what you mean with "I only get one period" |
||
May 22, 2012, 11:42 |
|
#16 |
New Member
Tom Schmitz
Join Date: Mar 2011
Posts: 19
Rep Power: 15 |
Thankl you, I changed my controlDict and now I got this
pplication potentialWaveFoam; startFrom latestTime; startTime 0; stopAt endTime; //nextWrite; endTime 0.00003; deltaT 1.67981e-8; writeControl timeStep; writeInterval 20; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression compressed; timeFormat general; timePrecision 6; runTimeModifiable yes; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // libs ( "libswakFunctionObjects.so" "libOpenFOAM.so" "libconvectiveOutlet.so"); functions ( setPhi{ type manipulateField; outputControl time Step; outputInterval 1; fieldName phi; expression "-1*cos(1*(time()+1.67981e-8))"; mask "pow(pos().x-0.015,2) + pow(pos().y,2) < pow(0.0015,2)"; keepPatches 1; } ); My goal is, that manipulateField sets a value, calculated according to expression, in the cells defined by mask. But the Field stays the same. There is no change at all. "I don't quite understand what you mean with "I only get one period"" - that was a mistake due to the boundary conditions |
|
May 22, 2012, 12:13 |
|
#17 |
New Member
Tom Schmitz
Join Date: Mar 2011
Posts: 19
Rep Power: 15 |
Ok, I think somehow I got the idea wrong. I tried as a testcase the icoFoam/elbow tutorial and changed the controlDict:
libs ( "libswakFunctionObjects.so"); functions ( setp{ type manipulateField; outputControl timeStep; outputInterval 1; fieldName p; expression "-50"; mask "pos().x<30"; keepPatches 1; } ); The logfile looks fine: ... Courant Number mean: 0.0811515 max: 0.506287 DILUPBiCG: Solving for Ux, Initial residual = 0.0279884, Final residual = 5.29406e-09, No Iterations 2 DILUPBiCG: Solving for Uy, Initial residual = 0.00545903, Final residual = 2.8224e-06, No Iterations 1 DICPCG: Solving for p, Initial residual = 0.654126, Final residual = 6.94353e-07, No Iterations 78 DICPCG: Solving for p, Initial residual = 0.545781, Final residual = 7.15208e-07, No Iterations 78 DICPCG: Solving for p, Initial residual = 0.101394, Final residual = 8.16843e-07, No Iterations 75 time step continuity errors : sum local = 3.10015e-10, global = -1.68954e-12, cumulative = 2.55056e-08 DICPCG: Solving for p, Initial residual = 0.176486, Final residual = 6.14894e-07, No Iterations 77 DICPCG: Solving for p, Initial residual = 0.0391996, Final residual = 8.09098e-07, No Iterations 73 DICPCG: Solving for p, Initial residual = 0.00463171, Final residual = 6.57855e-07, No Iterations 70 time step continuity errors : sum local = 1.60675e-10, global = 1.4462e-12, cumulative = 2.5507e-08 ExecutionTime = 6.35 s ClockTime = 6 s Manipulated field p in 209 cells with the expression "-50" Time = 19.55 ... Now I would expect to see a pressure of -50 in each cell which has a x-value below 30 (should be 209 cells, like the logfile says). But in Paraview there are no such cells. There is the mistake? I don't get it. |
|
May 22, 2012, 14:41 |
|
#18 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
To convince yourself try manipulating the U-field instead. As the U-Eqn has a ddt-term you should see that more clearly there |
||
May 22, 2012, 16:25 |
|
#19 |
New Member
Tom Schmitz
Join Date: Mar 2011
Posts: 19
Rep Power: 15 |
Ok, thank you very much. But how do i set a value for U? I tried some possibilities like
expression "(1 0.5 0)"; expression "1 0.5 0"; but it doesn't work. |
|
May 22, 2012, 16:38 |
|
#20 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
expression "vector(0,0,0)"; |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Droplet breakup using FLUENTT KHRT model | gauthamnarayan | FLUENT | 0 | June 30, 2016 01:51 |
[swak4Foam] To apply force on a droplet using funkySetFields | Shayansh | OpenFOAM Community Contributions | 1 | May 9, 2015 02:43 |
2D VOF Droplet evaporation model. Multi-component problem | nb92 | Fluent Multiphase | 0 | February 28, 2014 10:36 |
droplet falling - VOF | bohis | FLUENT | 1 | July 10, 2013 04:28 |
DieselFoam Droplet Temperature Issues - OF 1.6 | viv05 | OpenFOAM | 0 | February 27, 2010 11:20 |