CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swak4Foam] groovyBC - inlet profile at complex terrain

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 28, 2016, 03:58
Default groovyBC - inlet profile at complex terrain
  #1
Member
 
Jan Potac
Join Date: Aug 2009
Posts: 30
Rep Power: 17
potac is on a distinguished road
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);
    }
However in my results, the profile is not relative to the elevation of the bottom edge. In other words my profile does not start from the bottom edge. When I apply this on pitzDaily case with inlet not starting at 0 coordinate, it works fine. What am I missing here? Thanks.
Attached Images
File Type: png inlet.png (15.5 KB, 54 views)
potac is offline   Reply With Quote

Old   December 20, 2016, 20:21
Default
  #2
New Member
 
Mitchell Baum
Join Date: Sep 2015
Location: Australia
Posts: 7
Rep Power: 11
Mitchell Baum is on a distinguished road
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
Attached Images
File Type: jpg nonUniformInletPatch.jpg (22.3 KB, 37 views)
Mitchell Baum is offline   Reply With Quote

Old   January 3, 2017, 20:18
Default
  #3
New Member
 
Mitchell Baum
Join Date: Sep 2015
Location: Australia
Posts: 7
Rep Power: 11
Mitchell Baum is on a distinguished road
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);
    }
After:
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);
    }
If you have not yet reached a solution, perhaps you could apply a similar method and fit a curve to match your terrain and execute a similar process?

Kind regards,
Mitchell
Attached Images
File Type: jpg nonLinearVelocityProfileV2.jpg (22.7 KB, 25 views)
Mitchell Baum is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 11:52.