# Apparent wind Speed (moving object)

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 5, 2011, 06:10 Apparent wind Speed (moving object) #1 New Member   Andrew Wood Join Date: Oct 2011 Posts: 13 Rep Power: 7 Hi, Is there a way to assign a velocity to an object within a domain without actually making it move? I am trying to recreate the twisted apparent wind angle experienced by a yacht moving through the the wind. Due to the gradient atmospheric boundary layer, the boat experiences a more acute angle of attack lower down the rig due to an increased vector of the boat speed to wind speed. I have come to the conclusion that even if it is possible to recreate the correct vertical 'twist' which I have done, it is still impossible to create the increased apparent wind speed by using a static object (boat). It seems the only way to do this correctly is to actually move the boat itself. However, although I know there is a way of doing this within OpenFoam, it looks daunting and beyond my capability at the moment. So my question is, is there a way to assign a 'speed' or velocity to an object even if it is static within the case domain? (If that makes any sense at all!) Thanks, Andrew

 December 5, 2011, 09:12 #2 Member   Hannes Join Date: Apr 2009 Location: Schleswig, Germany Posts: 38 Rep Power: 9 Hi, basically it's a vector addition of true wind and boat velocity. First you've got to define a profile of true wind speed over height, e.g. by TWS(z)=TWS_10m*(z/10m)^e, with e = 0.1 for offshore or e = 0.17 for inshore. Disregarding heel, the apparent wind speed and angle over height are calculated by AWS(z) = ((TWS(z)*cos(TWA)+u)^2+(TWS(z)*sin(TWA))^2)^0.5 AWA(z) = arctan((TWS(z)*sin(TWA))/((TWS(z)*cos(TWA)+u)) Hannes

 December 5, 2011, 09:18 #3 New Member   Andrew Wood Join Date: Oct 2011 Posts: 13 Rep Power: 7 Hi Hannse, Thanks for your reply, I have the details for working out the figures, but... How do you go about defining the inlet velocity at certain heights? Thanks, Andrew Last edited by Solo Sails; December 5, 2011 at 09:37.

 December 5, 2011, 09:48 #4 Member   Hannes Join Date: Apr 2009 Location: Schleswig, Germany Posts: 38 Rep Power: 9 When simulating sails (until now with other codes but working on getting it done in OF), I define the Apparent wind as function of height on the inlets and as initial values, by the formulae I posted (decomposed to vector components). the floor is assigned the boats velocity. This way you get a situation you'd see standing on the boat with the environment moving around you.

 December 5, 2011, 09:53 #5 New Member   Andrew Wood Join Date: Oct 2011 Posts: 13 Rep Power: 7 Hi again, OK, I think I understand what you mean, but I am not sure how to assign the inlet values (sorry I am very new to OpenFoam). I am currently using the Atmospheric Boundary Layer setting for the inlet valve which as far as I can see calculates the boundary layer and gradient for standard atmospheric conditions, but I'm not sure how to modify this. Do you know how this is done? Also, re the floor velocity, does this effect anything within the domain?

 December 5, 2011, 09:58 #6 Member   Hannes Join Date: Apr 2009 Location: Schleswig, Germany Posts: 38 Rep Power: 9 Actually, I've never used the Atmospheric Boundary Layer setting, but I suppose it is intended for stationary object like wind turbines. Further, I suppose it generates a vector field depending on height, to this it might be possible to add a global motion vector (boat speed) somewhere in the code. The motion of the floor affects the boundary layer next to the water surface. If it is moving, you get a nature-like setup, if it is stationary, you have a wind-tunnel like setup.

 December 5, 2011, 10:02 #7 New Member   Andrew Wood Join Date: Oct 2011 Posts: 13 Rep Power: 7 Hmm, interesting, I will try adding a floor velocity. So are you able to modify a standard fixed velocity inlet to make it a gradient ? If so, how is this done? Andrew

 December 5, 2011, 10:27 #8 Member   Hannes Join Date: Apr 2009 Location: Schleswig, Germany Posts: 38 Rep Power: 9 Actually, in OF I haven't tried yet (only CFX and Star-CCM). GroovyBC resp. SWAK sounds quite good for it. Perhaps I'll manage to look into it within the next few days.

 December 5, 2011, 10:28 #9 New Member   Andrew Wood Join Date: Oct 2011 Posts: 13 Rep Power: 7 OK, let me know how you go! Thanks for your input Andrew

 December 7, 2011, 11:38 #10 New Member   Andrew Wood Join Date: Oct 2011 Posts: 13 Rep Power: 7 Anybody else know if it's ... a) possible to assign a velocity to an object so that it moves relative to the set flow velocity (but not in the domain)? b) Possible to modify the the vertical velocity for an inlet? Regards, Andrew

December 8, 2011, 17:59
#11
New Member

James Criner
Join Date: Mar 2009
Posts: 7
Rep Power: 9
Once you figure out what type of initial and boundary conditions best suit your problem, the attached files may help you with the mechanics of how to achieve your goals.

I highly recommend Bernhard Gschaider's swak4Foam for groovyBC, funkySetFields, and funkySetBoundaryField to start. If you have more specific needs and are experienced in OpenFOAM++, then write your custom own code to initialize fields a la appWindInit.

The package contains some examples of various approaches. Download and untar the file, then:

Compile and install swak4Foam http://openfoamwiki.net/index.php/Contrib/swak4Foam
Compile and install appWindInit (provided in package)
cd appWindTest
./Allclean (read what's going on inside)
./Allrun (read what's going on inside)
Then compare:
0/U = the original state (groovyBC Dict in U on xMin)
1/U = funkySetFields only (system/funkySetFieldDict)
2/U = funkySetFields + funkySetBoundaryField (system/funkySetBoundaryDict)
3/U = appWindInit (system/appWindDict)

It's up to the you to determine what method suits your needs best and why.

The appWindInit code is known to compile on OpenFOAM-1.6-ext and OpenFOAM-2.0.x. The appWindTest runs on OpenFOAM-1.6-ext, and should run on 2.0.x with no or minor modifications.

Good Luck.

James
Attached Files
 appWind.tar.gz (9.9 KB, 15 views)

 December 13, 2011, 09:34 #12 New Member   Andrew Wood Join Date: Oct 2011 Posts: 13 Rep Power: 7 Hi James, Thanks for your reply, That seems a bit beyond my skills for the moment, but will take the time to have a closer look. Thanks very much for your help, Andrew

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Canesin OpenFOAM Installation 137 January 20, 2016 15:56 nabilzhafri Main CFD Forum 0 July 22, 2010 11:28 Alicelin OpenFOAM Running, Solving & CFD 0 January 23, 2010 03:51 darenyang OpenFOAM Installation 0 April 29, 2009 04:55 hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36

All times are GMT -4. The time now is 03:31.