|
[Sponsors] |
October 31, 2011, 22:08 |
groovyBC synthax help
|
#1 |
New Member
Join Date: Mar 2009
Posts: 22
Rep Power: 17 |
I'm trying to set a velocity profile at my inlet for a 2D laminar flow using 1.6-ext
The equation I'm trying to write is U(y)=3/2*U0*(1-(2*y^2)/b^2) From looking at other threads this is the best I could come up with: Code:
inlet { type groovyBC; value uniform (0 0 0); variables "U_0=2.17;b=0.01;profile=(3/2)*U_0*(1-((pos().y*2)^2)/b^2)"; valueExpression "vector (profile, 0, 0)"; } gradientInternalCoeffs cannot be called for a genericFvPatchField (actual type groovyBC) on patch inlet of field U in file "/home/OpenFOAM/Simulation/test_1/0/U" You are probably trying to solve for a field with a generic boundary condition. From function genericFvPatchField<Type>::gradientInternalCoeffs( ) const in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 782. |
|
November 1, 2011, 02:23 |
|
#2 | |
Senior Member
Nima Samkhaniani
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,267
Blog Entries: 1
Rep Power: 25 |
Quote:
1) in syntacs why ^ use (2*pow(y,2)) for example for 2*y^2 2)you should add following sentence to the controlDict : libs ("libOpenFOAM.so""libgroovyBC.so"); |
||
November 13, 2011, 23:41 |
|
#3 |
New Member
Join Date: Mar 2009
Posts: 22
Rep Power: 17 |
Works great. Thanks
|
|
March 20, 2012, 09:39 |
|
#4 |
Senior Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 15 |
Dear Badly,
Sorry... Last edited by Goutam; March 20, 2012 at 11:19. |
|
March 20, 2012, 10:03 |
|
#5 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
controlDict has been in the same location since the beginning of mankind (OK. Almost. Since OF 1.0). Have a look at the user-guide, chapter 4 (in particular 4.3). But you must already have stumbled upon it when you were going through the first tutorial in the UG
|
|
March 20, 2012, 11:18 |
|
#6 | |
Senior Member
Goutam Saha
Join Date: Dec 2011
Location: UK
Posts: 131
Rep Power: 15 |
Quote:
|
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] groovyBC for oscillatory flow | liybzd | OpenFOAM Community Contributions | 5 | November 12, 2018 08:53 |
[swak4Foam] reactingMultiPhaseEulerFoam problems with groovyBC | zanilu70 | OpenFOAM Community Contributions | 4 | December 13, 2016 07:46 |
[swak4Foam] Change in alpha and U with groovyBC in twoPhaseEulerFoam | dani2702 | OpenFOAM Community Contributions | 0 | November 17, 2016 04:30 |
[swak4Foam] groovyBC issue - k and epsilon | sagnikmazumdar | OpenFOAM Community Contributions | 24 | March 1, 2015 08:16 |
[swak4Foam] groovyBC and Eqn.setReference() | benk | OpenFOAM Community Contributions | 3 | June 2, 2011 09:49 |