|
[Sponsors] |
September 22, 2009, 20:34 |
funkySetFields
|
#1 |
New Member
Chioma Frances Nnaji
Join Date: Sep 2009
Posts: 2
Rep Power: 0 |
Hello everyone,
Please can someone help me out. My geometry is a simple cylinder with boundaries as base, wall and top. The boundary condition for velocity field at the base is (0.5y,0.5x,0). I realized that I have to use funkySetFields in order to introduce such conditions. This I did using the dictionary option, a sample of my dictionary is expression ( base field U; expression "vector (0.5*pos().y, 0.5*pos().x, 0)"; ) it worked but unfortunately, it computed for the whole cylinder which has a total of 154000 cells. I am presently trying to use "conditions" so that the expression is only applied at the base. I used conditions "pos().z=0", but I keep getting an error of invalid character. I decided to give this condition since there is no z component at the base. Please, I need a command which applies this condition only to the base and not the whole geometry. Thanks |
|
September 23, 2009, 10:02 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
http://openfoamwiki.net/index.php/Co...t-Room_Example where the usage is demonstrated. An alternative would be the groovyBC, but as your boundary condition is stationary this would be like going after mice with an atom-bomb |
||
September 23, 2009, 15:52 |
|
#3 |
New Member
Chioma Frances Nnaji
Join Date: Sep 2009
Posts: 2
Rep Power: 0 |
Thanks so much, I will look into it and hopefully I would get my expected results.
|
|
July 25, 2011, 18:30 |
Using dictionary
|
#4 |
Member
Join Date: Mar 2010
Posts: 31
Rep Power: 16 |
Hi,
I installed funkySetFields last week, and have been having some fun playing around with it, on OF 1.6 I've successfully set up the dictionary version for specifying two different fluids: simple example to make waves. FoamFile { version 2.0; format ascii; class dictionary; location "system"; object funkySetFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // expressions ( Alpha1 { field alpha1; expression "1"; condition "pos().y>= 0.5"; } ); ----------- My question is this: how would I used the dictionary to specify velocity? I did manage to set velocity with a command line approach: funkySetFields -field U -expression 'vector(0,10*pos().y,0)' -condition "pos().y > 0.5" -time 0 but I'd like to know how to do it via a dictionary. Whatever I tried didn't work! TIA |
|
July 25, 2011, 19:33 |
|
#5 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Code:
field U; |
||
December 6, 2011, 08:15 |
Initialize field alpha
|
#6 |
Member
Stefan
Join Date: Jan 2010
Location: Kiel, Germany
Posts: 81
Rep Power: 16 |
Hello,
Before opening a new thread, I post my problem of initializing field alpha with expression from http://openfoamwiki.net/index.php/Co...on_Sloping_Bed right here. When using funkySetFields, I get following error message: Code:
/*---------------------------------------------------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM Extend Project: Open source CFD | | \\ / O peration | Version: 1.6-ext | | \\ / A nd | Web: www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ Build : 1.6-ext-632b4ce56df2 Exec : funkySetFields -time 0 Date : Dec 06 2011 Time : 12:50:06 Host : pc1 PID : 15447 Case : /home/tmp/testCase nProcs : 1 SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Time = 0 Using funkySetFieldsDict Part: internalAlphaField Putting "faceAverage((fpos().z + surf(0.5) * fproj().z) <= (surf(0.0)) ? surf(1.0) : ((fpos().z - surf(0.5) * fproj().z) > surf(0.0) ? surf(0.0) : (surf(0.5) - fpos().z / (fproj().z + surf(0.00000001)))))" into field alpha1 at t = "0" if condition "true" is true Keeping patches unaltered --> FOAM FATAL ERROR: Unknown patch field type zeroGradient Valid patchField types are : 12 ( processor overlapGgi wedge fixedValue empty calculated regionCoupling cyclicGgi ggi symmetryPlane sliced cyclic ) From function fvsPatchField<Type>::New(const word&, const fvPatch&, const DimensionedField<Type, surfaceMesh>) in file lnInclude/newFvsPatchField.C at line 61. FOAM exiting I am using swak4Foam with 1.6-ext, see header above for more details. Maybe someone has any clue, what is wrong here? Stefan |
|
December 6, 2011, 14:56 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Bernhard |
||
December 7, 2011, 04:53 |
|
#8 |
Member
Stefan
Join Date: Jan 2010
Location: Kiel, Germany
Posts: 81
Rep Power: 16 |
Thank you Bernhard for quick reply, svn info of my swak4Foam states:
Code:
Pfad: swak4Foam URL: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend/trunk/Breeder_1.7/libraries/swak4Foam Basis des Projektarchivs: https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend UUID des Projektarchivs: e4e07f05-0c2f-0410-a05a-b8ba57e0c909 Revision: 1919 Knotentyp: Verzeichnis Plan: normal Letzter Autor: bgschaid Letzte geänderte Rev: 1919 Letztes Änderungsdatum: 2011-10-03 22:40:31 +0200 (Mo, 03. Okt 2011) |
|
December 7, 2011, 05:56 |
|
#9 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
|
||
December 7, 2011, 11:12 |
|
#10 |
Member
Stefan
Join Date: Jan 2010
Location: Kiel, Germany
Posts: 81
Rep Power: 16 |
Could this error be related to the simpleFunctionObjects-library? I did not explicitly compile this library before compiling swak4Foam.
The error only occur, if I use 'faceAverage' expression. |
|
December 7, 2011, 15:28 |
|
#11 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
The problem is one of the intermediate surfaceScalarFields (when that gets created) |
||
|
|
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] funkySetFields | Chrisi1984 | OpenFOAM Community Contributions | 10 | June 17, 2010 04:26 |