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

floatingObject initial angle

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 11, 2014, 13:37
Default floatingObject initial angle
  #1
New Member
 
Join Date: Aug 2010
Posts: 15
Rep Power: 15
CThib is on a distinguished road
Hi all,

What is the syntax for setting the initial roll angle in the OpenFOAM floatingObject tutorial? The solver is interDyMFoam and I believe the initial conditions go in the dynamicMeshDict file as a member of the sixDoFRigidBodyMotion data struct.

I'm not a total newbie to OF, I don't know why I'm having such a hard time finding the syntax. I am having a special moment.

Cheers,

CThib
CThib is offline   Reply With Quote

Old   August 13, 2014, 14:50
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings CThib,

It's simple: the initial angle is already hard-coded in the mesh and can only be modified in the mesh itself.
One way to change the initial angle is to use the pseudo-solver moveDynamicMesh to do the necessary motion steps for rotating the object to the original position you want. But this will need a different configuration in the "dynamicMeshDict", such as the one in the sloshing tank tutorials.
And keep in mind that only after that mesh motion you can use setFields to properly assign the "alpha" values; otherwise the "alpha" fields will be distorted along with the mesh, i.e. will stay in the cells they were defined on.

Best regards,
Bruno
mo_na likes this.
__________________
wyldckat is offline   Reply With Quote

Old   August 14, 2014, 12:31
Default
  #3
New Member
 
Join Date: Aug 2010
Posts: 15
Rep Power: 15
CThib is on a distinguished road
Hi Bruno,

Thanks for the reply.

moveDynamicMesh rotates both the floating object and the background mesh as shown in the first screenshot. I obtain a similar result when I used the rotMesh command, which is faster and easier.

Is there a way to rotate only the floating object, similar to the second screenshot?

Here are the ship design coefficients I used. The portions commented out are the defaults from the 3d rotating tank tutorial.

Code:
solidBodyMotionFvMeshCoeffs
{
    solidBodyMotionFunction SDA;
    SDACoeffs
    {
        CofG            ( 0.5 0.5 0.5 );
        lamda           1; //model scale ratio (?)
//        lamda 50;
	rollAmax 0.22654;
	rollAmin 0.0;
/*
        rollAmax        0.22654;
        rollAmin        0.10472;
        heaveA          3.79;
        swayA           2.34;
        Q               2; // damping
*/
        heaveA          0;
        swayA           0;
        Q               2; // damping

        Tp              13.93; // time period for liquid
        Tpn             11.93; // natural period for ship
        dTi             0.059; // reference timestep
        dTp             -0.001; // increase in Tp per unit dTi
// (^???)
    }
}
Thank you for your assistance Bruno it is much appreciated.

CThib
Attached Images
File Type: jpg mvDynamicMesh.jpg (46.5 KB, 65 views)
File Type: jpg Alpha.jpg (47.2 KB, 63 views)
CThib is offline   Reply With Quote

Old   August 14, 2014, 15:13
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi CThib,

Sorry, I forgot that the sloshing tank tutorial is a full body motion I only envisioned the rotation and motion it does and forgot that it would move the whole mesh.

Have a look at the tutorial "multiphase/interDyMFoam/ras/mixerVesselAMI". If I'm not mistaken, the trick is to use "omega" and the number of iterations and time in your favour... No, wait... that tutorial requires that the cell zone can rotate freely.
OK, the tutorial "incompressible/pimpleDyMFoam/movingCone" seems promising... although it only works in linear motion and you need rotation.

... This was getting complicated to find! I even went to the source code to find answers, but fortunately the block in the floating object is not a cell zone, it's a patch. This is good, because this means you can use the tutorial "incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam" as a reference for the motion.

Wait... the two tutorials are very similar, regarding the configuration of "dynamicMeshDict"... well, now I'm confused

I very vaguely remember reading something about this on this forum or in a presentation about ship simulations with OpenFOAM... I think I've found it, I believe it's this one: http://www.tfd.chalmers.se/~hani/kur...reeSurface.pdf

There is also the tutorial "movingBlockRBF", but it's only present in the Extend variant of OpenFOAM, namely 1.6-ext to foam-extend 3.1.

... although, after a bit of thinking, I believe I got a possible solution, even though the RBF should provide the best mesh distortion (search for "OpenFOAM RBF" to see what I'm talking about).
Anyway, you'll need 2 things:
  1. The tutorial "incompressible/pimpleDyMFoam/movingCone" to use as a reference.
  2. Then notice that on that tutorial there is a file named "0/pointMotionUx". You can use instead the file "0/pointMotionU", as explained in the link above. But instead of implementing your custom BC, you can use groovyBC to generate.
Irgh... why am I complicating things.... have a look at the example tutorial "Examples/groovyBC/movingConeDistorted/" in swak4Foam.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 15, 2014, 10:02
Default
  #5
New Member
 
Join Date: Aug 2010
Posts: 15
Rep Power: 15
CThib is on a distinguished road
Hi Bruno,

Thank you for the many leads, it'll take me a while to investigate.

I used the chalmers paper earlier this year to generate a forced roll motion study of a ship cross section for the purpose of obtaining viscous roll damping. I'm thinking I can run that simulation from t0 to t1 then restart the simulation from t1 to t2 using the floatingObject approach. We use another naval architect program that uses potential flow to calculate added mass and damping, generate response amplitude operators in the frequency domain, etc.

I've uploaded a couple videos for you to look at, just as show and tell. The first is the forced roll motion case study I mentioned, the second is the simulation I just ran after using moveDynamicMesh. There are strange artifacts in the mesh.

https://www.dropbox.com/s/oufr15i49j35xj8/video.avi

https://www.dropbox.com/s/mird3j6c2gg3x8v/out.ogv

EDIT:
Another video, similar to first except cross section has bilge keel protrusions
https://www.dropbox.com/s/261qd9xw06...Tumblehome.ogv
CThib is offline   Reply With Quote

Old   August 16, 2014, 05:48
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by CThib View Post
There are strange artifacts in the mesh.
Quick answer: Have a look at this post: http://www.cfd-online.com/Forums/ope...tml#post506220 post #2
wyldckat 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
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
Moving mesh Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20
pimpleFoam: turbulence->correct(); is not executed when using residualControl hfs OpenFOAM Running, Solving & CFD 3 October 29, 2013 08:35
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37
Orifice Plate with a fully developed flow - Problems with convergence jonmec OpenFOAM Running, Solving & CFD 3 July 28, 2011 05:24


All times are GMT -4. The time now is 14:15.