CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Simulate the movement of boats (https://www.cfd-online.com/Forums/openfoam-solving/57929-simulate-movement-boats.html)

juliuslein February 19, 2009 09:17

Hello, I was just running E
 
Hello,

I was just running Eric's case and I'm still confused about the pressures. In the 0/ directory there is only a dynamic pressure pd but in all following directories there exists the hydrostatical pressure p. Any idea where this is implemented?

Thanks, Julius

juliuslein February 19, 2009 09:18

Hello, I was just running E
 
Hello,

I was just running Eric's case and I'm still confused about the pressures. In the 0/ directory there is only a dynamic pressure pd but in all following directories there exists the hydrostatical pressure p. Any idea why this happens and where this behaviour is implemented? Finally I'm interested in the combined pressure.

Thanks, Julius

markc February 19, 2009 09:36

Julius, Look at createField
 
Julius,

Look at createFields.H from either interFoam or interDyMFoam. Hydrostatic pressure is constructed from rho*g*h, where rho depends on gamma. Then p is created by adding pd. So p is total pressure.

Brgds,

Mark

juliuslein February 19, 2009 11:17

Hello Mark, thanks a lot fo
 
Hello Mark,

thanks a lot for the fast response. It really helped.

During my study project I'm actually working on a solver for a ship with free sinkage and trim. The combination of the rasInterFoam with the simpleForceFoam (from this forum) is already working but it moves the ship only in one direction (here z).
The displacement and so on the mass will be determined with a buoyancy module (also from the forum). There also seems to an output for the trimming moments.

You know if there is already written a good module to trim the ship or will I have to implement this on my own?

In case you're interested in the solver I can post the actual version, but so far I'm not sure about the reliability...

Thanks, Julius

markc February 20, 2009 02:01

Hello Julius, For sure ther
 
Hello Julius,

For sure there are many people working on your subject and I am almost certain that many people have build solvers. E.g. me. I am finalising a solver which has 6 DOF capability. Once it is complete I will post it. There is another thread on this forum where e.g. Eric Paterson and Hrv show some capabilities of what they made. Eric published some presentation about the subject as well.

Brgds,

Mark

egp February 20, 2009 05:58

Hi Mark, Yes, you are right
 
Hi Mark,

Yes, you are right. We've been working on this, and have all the pieces put together:

RANS/LES + VOF + Forces/Moments + 6DOF + wave models + beach/outlet + mesh motion

However, we've not been able/ready to release this back to the community for several reasons. For sponsored research, the sponsor has to approve public release of the technology they paid for, and this can be a very painful and slow process (at a time-scale which is VERY different from a discussion forum!!). In the short term, I do have a student who is wrapping up his thesis this semester which documents the basic test cases and model verification.

Eric

nico765 February 20, 2009 07:26

are you talking about mesh mot
 
are you talking about mesh motion or mesh deformation?
Why is mesh deformation the preferred (and only??) way to do things in openFoam (for 6DOF ship cases)?
Pure mesh motion seems to work well enough in commercial codes.

johnb February 4, 2010 16:36

rasInterDyMFoam
 
Hi!

I read this thread with huge interest and I am looking forward doing/learning more about Marine Hydrodynamics and ship motion simulations.
I wonder if the rasInterDyMFoam solver is available somewhere? (I am running openfoam 1.6.x)

And if there is some test cases like wigley hull (the download link provided by Eric Paterson, seams to be out of date) or a 3D box-barge available?

I hope that there is still some people that read this thread.

Thanks in advance!

rubenparedes March 5, 2010 16:00

sixDoFRigidBodyMotion - OF1.6.x
 
I am trying to simulate a cylinder and I was ready to implement my own solver to allow a 1 DoF motion updating the pointPatchField, but I found that there is a functionObject that seems to do the same but in a more general form. Has someone already used it ?

R

rubenparedes March 8, 2010 09:56

Never mind...I found the floatingObject tutorial in the interFoam solver. I will check it and see how to adapt it to my especific case.

R

rubenparedes March 10, 2010 16:14

Help with sixDoFRigidBodyDisplacement
 
Hi there,

Maybe I am not seeing my mistake in my case directory. I run the floatingObject tutorial adding constraints and restraints, but this tutorial run with interDyMFoam. Now, I tried to use pimpleDyMFoam solver with the same boundary condition in the pointDisplacement file, as:
cylinder
{
type sixDoFRigidBodyDisplacement;
centreOfMass (0.0 0.0 0.0);
momentOfInertia (0.08622222 0.08622222 0.144);
mass 9.6;
rhoInf 1;
report on;
value uniform (0 0 0);
}


But I got the following error:
Starting time loop

Courant Number mean: 0.405338 max: 1.06818
deltaT = 0.00233645
Time = 0.00233645

--> FOAM Warning :
From function void forces::read(const dictionary& dict)
in file forces/forces.C at line 278
Could not find U, p or rho in database.
De-activating forces.

--> FOAM FATAL ERROR:
request for volScalarField rho from objectRegistry region0 failed
available objects of type volScalarField are
3
(
rAU
nu
p
)

From function objectRegistry::lookupObject<Type>(const word&) const
in file /home/rparedes/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 140.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linuxGccDPOpt/pimpleDyMFoam"
#3 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::Geometric Field<double, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libdynamicFvMesh.so"
#4 Foam::forces::rho() const in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libforces.so"
#5 Foam::forces::devRhoReff() const in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libforces.so"
#6 Foam::forces::calcForcesMoment() const in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libforces.so"
#7 Foam::sixDoFRigidBodyDisplacementPointPatchVectorF ield::updateCoeffs() in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libforces.so"
#8 Foam::displacementLaplacianFvMotionSolver::solve() in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libfvMotionSolvers.so"
#9 Foam::motionSolver::newPoints() in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libdynamicMesh.so"
#10 Foam::dynamicMotionSolverFvMesh::update() in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/lib/linuxGccDPOpt/libdynamicFvMesh.so"
#11 main in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linuxGccDPOpt/pimpleDyMFoam"
#12 __libc_start_main in "/lib/libc.so.6"
#13 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/rparedes/OpenFOAM/OpenFOAM-1.6.x/applications/bin/linuxGccDPOpt/pimpleDyMFoam"

Any idea? I don't know if this type of BC is running only with interDyMFoam solver or I need to add a library in my case directory.

Any comment is appreciated.

R.

rubenparedes March 10, 2010 16:54

It looks like this boundary type assumes that rhoName is "rho" and it is loaded in objectRegistry, so I would like to add this entry to the BC specification before rhoInf and add it to the forceDict dictionary following what is done in the sixDoFRigidBodyDisplacement.C.

Should I copy the whole force directory in my user library and modify it there? o I can modify it in the force/pointPatchFields directory? This can make this boundary type more general, isn't it?

Thanks in advance,

R.

rubenparedes March 10, 2010 17:21

I added the following to the sixDoFRigidBodyDisplacementPointPatchVectorField.C file:
if !obr_.foundObject<volScalarField>(rhoName_)
{
forcesDict.add("rhoName", "rhoInf");
}

So, in the case rho is not found, rhoName is rhoInf and the forces will stay active.

But, should I compile the original force library?

R.

Philer July 23, 2010 10:44

Reuben,

Good to see you posts here. Have you solved your problems? I am also trying to use the new six Dof function objects in OF 1.7. I would appreciate if you can share your experience.

Thanks,
Philer

rubenparedes July 30, 2010 10:27

Hi Philer,

I haven't use 1.7 version yet. But in 1.6 I need to read the source code of the sixDof solver. Maybe It is a good idea to run the related tutorial first and after that check what the code is doing. What kind of problem are you trying to solve?

Ruben

Ralph M October 28, 2010 05:51

Hello guys,

I have a short question. When you look at the following code:
Quote:

{
type sixDoFRigidBodyDisplacement;
centreOfMass (0.0 0.0 0.0);
momentOfInertia (0.08622222 0.08622222 0.144);
mass 9.6;
rhoInf 1;
report on;
value uniform (0 0 0);
}
What does the bold section define and especially what value is defined?

I assume that the centreofmass is defined with respect to the origin of the system and that the momentofintertia is defined drom the CoG with SI units?

Ralph

kumar2 June 12, 2012 23:28

floatingObject; OpenFOAM 2.1.0
 
Hi All,

I am trying to run the floatingObject tutorial in OpenFOAM-2.1.0 and the solver is blowing up after about t=0.27seconds. Even after I remove the forcing by starting the free surface everywhere at same level the floating object appears to accelerate vertically and sink into the water (and the solver blows). Since the free surface is at the same level, I would expect the floating body also to remain still but that is not happening..

This is the output from my run
//////////////////////////////////error///////////
Interface Courant Number mean: 0.13623984456 max: 2324.15525094
Courant Number mean: 12.0896464711 max: 24996.1741153
deltaT = 1.28352545896e-16
--> FOAM Warning :
From function Time::operator++()
in file db/Time/Time.C at line 982
Increased the timePrecision from 12 to 13 to distinguish between timeNames at time 0.273293722815
Time = 0.2732937228149
Centre of mass: (0.499763530769 0.499909411615 0.481938866477)
Linear velocity: (84515.8423454 -38920.5115026 -926498.670898)
Angular velocity: (-6146764.77689 -10448743.9969 -41889.7307784)
GAMG: Solving for cellDisplacementx, Initial residual = 6.65389773234e-05, Final residual = 2.40427721102e-06, No Iterations 2
GAMG: Solving for cellDisplacementy, Initial residual = 6.65404874525e-05, Final residual = 2.4043006986e-06, No Iterations 2
GAMG: Solving for cellDisplacementz, Initial residual = 7.68201227789e-05, Final residual = 2.66993401972e-06, No Iterations 2
Execution time for mesh.update() = 0.54 s
time step continuity errors : sum local = 2.93736797188e-06, global = 8.60745930793e-08, cumulative = 0.218511940113
GAMGPCG: Solving for pcorr, Initial residual = 1, Final residual = 9.99741575584e-07, No Iterations 6
time step continuity errors : sum local = 0.000261051952619, global = 1.05557381465e-11, cumulative = 0.218511940123
--> FOAM Warning :
From function Time::operator++()
in file db/Time/Time.C at line 982
Increased the timePrecision from 13 to 16 to distinguish between timeNames at time 0.273293722815
#0 Foam::error::printStack(Foam::Ostream&) in "/share/gecko/krishnak/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/share/gecko/krishnak/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 __restore_rt at sigaction.c:0
#3 void Foam::MULES::limiter<Foam::geometricOneField, Foam::zeroField, Foam::zeroField>(Foam::Field<double>&, Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::zeroField const&, Foam::zeroField const&, double, double, int) in "/share/gecko/krishnak/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#4 void Foam::MULES::limit<Foam::geometricOneField, Foam::zeroField, Foam::zeroField>(Foam::geometricOneField const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, Foam::zeroField const&, Foam::zeroField const&, double, double, int, bool) in "/share/gecko/krishnak/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#5 Foam::MULES::explicitSolve(Foam::GeometricField<do uble, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, double, double) in "/share/gecko/krishnak/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libfiniteVolume.so"
#6 main in "/share/gecko/krishnak/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/interDyMFoam"
#7 __libc_start_main in "/lib64/libc.so.6"
#8 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/share/gecko/krishnak/OpenFOAM/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/bin/interDyMFoam"
Floating point exception
-bash-3.2$
/////////////// end of errors///

Is there a fix for this error?

Thanks in advance

Best regards

Kumar

dahicke October 29, 2012 22:57

RE: sixDoFRigidBodyMotion
 
Hi Kumar,

Glad to find this post. I am running to the same problem and am looking into the sixDoFRigidBodyMotion code. I have mentioned this problem to Jacobsen on the OpenFoam-extended, Wave2Foam project. My thought were that there was some symbol coupling in the code between the BC wave generation and the sixDoFRigidBodyMotion code. Jacobsen agreed that was possibility, since he has not done much or any work with that library.

I have tried using multiple processors with my case to hopeful break the symbol coupling, but that doesn't work either.

I am now deep in that code looking for the how or where this coming from and how to stop it.

Have you had any luck tracking this down?

I have been documenting this library in the wiki at:
http://openfoamwiki.net/index.php/Ma...um#Constraints
based on what I read in the code.

Dave Hickerson



Quote:

Originally Posted by kumar2 (Post 366130)
Hi All,

I am trying to run the floatingObject tutorial in OpenFOAM-2.1.0 and the solver is blowing up after about t=0.27seconds. Even after I remove the forcing by starting the free surface everywhere at same level the floating object appears to accelerate vertically and sink into the water (and the solver blows). Since the free surface is at the same level, I would expect the floating body also to remain still but that is not happening..

......

Is there a fix for this error?

Thanks in advance

Best regards

Kumar


Ralph M October 30, 2012 02:15

Dear David,

I've been on the same road that you're on right now. While talking to prof Jasak I got the impression that the interFoam solver isn't suited for ship motions (or at least structural modifications are needed to make it suitable). The main reason for this is the pressure fluctuation caused by the motions.

Some people already worked on this; which resulted in the shipFoam and navalFoam solvers (both to be found on sourceforge). They aren't both fully working yet, but might give you an idea where to go to! Mind you, navalFoam is developed for OF16-ext, while shipFoam is available for OF16 and OF17.

What topic are you working on?

Ralph

dahicke October 30, 2012 14:44

RE: sixDoFRigidBodyMotion
 
Hi Ralph,

Thanks for info. I am working on a thesis for my OE Master's at Virginia Tech. The subject is a study of water wave reduction phenomena called "heaving-to" developed hundreds of years ago to help ships weather storms. When a ship is configured to heave-to, it slips sideways with the wind creating a turbulent wake in the path of oncoming waves. This wake reduces the waves impacting the ship. My goal is to use a simple configure of a box or hull form moving away from the on coming waves simulating the wake effect and the waves interacting with the wake. So my focus is on the wave and wake interaction, and not on the hull form.

What have found with the modified interFoam code is that the box position is unstable in the z direction, either sinking or rising depending on the initial condition of being above or below the ship's water line. In my latest case, it was below and the box was rising out of the water.

I will definitely go look at shipFoam and navalFoam and see about modifying those with the wave2Foam BC code.

I am glad you posted. I was looking for possible symbol coupling in the code associated with the Pstream functions. With everything well namespaced, that was about the only area I thought it occur.

Dave


All times are GMT -4. The time now is 13:18.