|
[Sponsors] |
[swak4Foam] groovyBC - inlet profile at complex terrain |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 28, 2016, 03:58 |
groovyBC - inlet profile at complex terrain
|
#1 |
Member
Jan Potac
Join Date: Aug 2009
Posts: 30
Rep Power: 17 |
I have defined a logarithmic velocity profile at domain over a complex terrain using groovyBC as
Code:
inlet { type groovyBC; variables "Uref=$Uref;Zref=$Zref;z0=$z0;kappa=$kappa;Ufr=Uref*kappa/log(Zref/z0);minz=min(pts().z);WD=$WD;"; valueExpression "vector(Ufr/kappa*log(((pos().z)+z0)/z0)*cos(WD), Ufr/kappa*log(((pos().z)+z0)/z0)*sin(WD), 0)"; value uniform (0 0 0); } |
|
December 20, 2016, 20:21 |
|
#2 |
New Member
Mitchell Baum
Join Date: Sep 2015
Location: Australia
Posts: 7
Rep Power: 11 |
Hi Potac,
I'm experiencing a similar issue where I'm trying to impose a velocity profile at the model inlet in accordance with fitted field data. Ideally, I would like to implement the profile uniformly over the patch, however with the slope of the lower boundary I encounter issues. Have you made any further progress since your last post? Kind regards, Mitchell |
|
January 3, 2017, 20:18 |
|
#3 |
New Member
Mitchell Baum
Join Date: Sep 2015
Location: Australia
Posts: 7
Rep Power: 11 |
Hi Potac,
I am still unsure about how your implementation works in pitzDaily, however I have since achieved my desired inlet BC. My issue was simply resolved by subtracting the slope from my desired velocity profile (7th order Gaussian fit). Before: Code:
Inlet { type groovyBC; variables ( "a1= 0.1828;" "b1= -21.15;" "c1= 4.2;" "a2= 0.1829;" "b2= -31.27;" "c2= 3.851;" "a3= 0.001014;" "b3= -28;" "c3= 0.02724;" "a4= -0.1166;" "b4= -15.38;" "c4= 2.68;" "a5= 0.04652;" "b5= -10.67;" "c5= 2.141;" "a6= 0.1419;" "b6= -26.29;" "c6= 3.65;" "a7= 0.2606;" "b7= -15.25;" "c7= 3.469;" "zp= pos().z;" "velProfile= (a1*exp(-1*pow(((zp-b1)/c1),2)) + a2*exp(-1*pow(((zp-b2)/c2),2)) + a3*exp(-1*pow(((zp-b3)/c3),2)) + a4*exp(-1*pow(((zp-b4)/c4),2)) + a5*exp(-1*pow(((zp-b5)/c5),2)) + a6*exp(-1*pow(((zp-b6)/c6),2)) + a7*exp(-1*pow(((zp-b7)/c7),2)));" ); valueExpression "-1*velProfile*normal()"; value uniform (0 0.151 0); } Code:
Inlet { type groovyBC; variables ( "a1= 12.5;" "b1= -31.83;" "c1= 9.766;" "a2= -12.26;" "b2= -31.87;" "c2= 9.601;" "a3= 0.004232;" "b3= -26.65;" "c3= 0.3996;" "a4= -1.862;" "b4= -14.29;" "c4= 3.392;" "a5= 1.95;" "b5= -14.27;" "c5= 3.458;" "a6= -0.1094;" "b6= -25.46;" "c6= 5.007;" "a7= 0;" "b7= -17.9;" "c7= 0.01037;" "zp= pos().z;" "xp= pos().x;" "slopeEq= 0.01543*xp -1.04256;" "velProfile= (a1*exp(-1*pow(((zp-slopeEq- b1)/c1),2)) + a2*exp(-1*pow(((zp-slopeEq-b2)/c2),2)) + a3*exp(-1*pow(((zp-slopeEq-b3)/c3),2)) + a4*exp(-1*pow(((zp-slopeEq-b4)/c4),2)) + a5*exp(-1*pow(((zp-slopeEq-b5)/c5),2)) + a6*exp(-1*pow(((zp-slopeEq-b6)/c6),2)) + a7*exp(-1*pow(((zp-slopeEq-b7)/c7),2)));" ); valueExpression "-1*velProfile*normal()"; value uniform (0 0.151 0); } Kind regards, Mitchell |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to apply variabe roughness, e.g. to complex terrain? | Fridolin | OpenFOAM Running, Solving & CFD | 3 | August 12, 2020 16:09 |
[swak4Foam] parabolic velocity profile with fluctuations (groovyBC?) | newOFuser | OpenFOAM Community Contributions | 17 | July 15, 2013 18:27 |
help with boundary profile in pressure inlet | quiqui | FLUENT | 21 | June 18, 2013 13:55 |
How to apply an outlet velocity profile to another inlet? | siw | FLUENT | 4 | April 10, 2013 12:19 |
Pulsatile profile at inlet | Josyula | Fluent UDF and Scheme Programming | 4 | May 6, 2012 11:09 |