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/)
-   -   Free Surface Ship Flow (https://www.cfd-online.com/Forums/openfoam-solving/58350-free-surface-ship-flow.html)

g.redondo December 15, 2009 11:10

Hi Matteo,

You mean nut, right? I have the following:

HULL
{
type nutWallFunction;
value uniform 0;
}

Gonzalo

hassan79 December 16, 2009 00:29

simulation in local heat transfer downstream of an abrupt expansion
 
Good Day

Please I need your help

I want simulation in local heat transfer downstream of an abrupt expansion in a circular channel with a constant wall heat flux


Fluid air and turbulent flow and fully developed
Reynolds no =5300 to 87000

I will change diameter ratio\


I want simulate by used CFD fluent

Objective of the study

Present research purpose is to obtain detail heat transfer coefficient and surface temperature downstream of an abrupt expansion pipes, and to investigate the flow of an abrupt expansion pipe for the different pipe to test section ratio (D/d) and different range of Reynolds number.
The research will concentrate of the phenomena effecting parameter such as wall heat flux, air flow velocity and the separation step height.
wich best in this case K-epsilon Or K- omega and which model


Scope of the study

The aim present work is to simulate by using CFD Fluent 6.3 the effect of flow separation on heat transfer process for the axisymmetric, turbulent separated flow in an annular passage. The air flow separation in induced by different height of a circular steps by reduction the outer annular tube diameter upstream of the heated test section. Reattachment and redevelopment of the flow occurred behind the point of separation. The test heated pipe is electrically, where, the experiments provide a constant heat Flux ranged from about 80 W/m2 to 720 W/m2 for each step. The degree of the separation is varied by using different tubes diameter of heating section which provided height steps ratio range varied from (0.267–1).The Reynolds number Red encompassed a range from about 5300 to 87000 it was varied by change air velocity by changing gate position for blower


Thank you so much

hassan

Master student

UPM University

Malaysia



g.redondo December 16, 2009 08:56

Hi hassan,

I see that you're using Fluent. In order to keep things focused, it would be great if you can copy your post and make a new thread about it in the Fluent forum. There's lot of people there with more experience in that package willing to help you. Don't forget to remove it from here.

Regards,

Gonzalo

g.redondo December 16, 2009 09:08

Forces
 
4 Attachment(s)
Well, this is how thing are going today...

First of all, many thanks to Matteo who came up yesterday with a modification in the interFoam solver to make it work with the new force function. Now I think the forces are correctly calculated, which doesn't mean they're correct though.

Now there's a rho file in the \0 folder. I found it was necessary to initialized it the same way we do for alpha, otherwise it diverges. The viscous forces have improved significantly, but we are still way off. I attach the force convergence plots until 5s.

Attachment 1791

Attachment 1792

Attachment 1793

Attachment 1794

As I already investigated lots of variables, now I wonder if the wall function is defined properly. This is my nut and nuTilda, any idea?

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0;

boundaryField
{
OUTLET
{
type calculated;
value uniform 0;
}
SYMMETRY
{
type symmetryPlane;
}
ATMOSPHERE
{
type calculated;
value uniform 0;
}
EXTRAHULL
{
type nutWallFunction;
value uniform 0;
}
INLET
{
type calculated;
value uniform 0;
}
HULL
{
type nutWallFunction;
value uniform 0;
}
}


// ************************************************** *********************** //

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object nuTilda;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -1 0 0 0 0];

internalField uniform 0.0009;

boundaryField
{
OUTLET
{
type zeroGradient;
}
SYMMETRY
{
type symmetryPlane;
}
ATMOSPHERE
{
type fixedValue;
value uniform 0.0009;
}
EXTRAHULL
{
type zeroGradient;
}
INLET
{
type fixedValue;
value uniform 0.0009;
}
HULL
{
type zeroGradient;
}
}


// ************************************************** *********************** //

obraun December 16, 2009 09:51

As there is this thread open about problems with inter...Foam, I try it here before opening a new one.
First I have to admit we are mot very experiences with the VOF implementation in OpenFOAM and i do not have the time to go through all sources to understand how volume fraction conservation is treated with dynamic meshes.
Did anyone encounter a similar problem to what we found in interDyMFoam for simulating a falling wedge, using a procedure similar to the dynamicInkJetMesh, compressing the mesh under the wedge while the wedge region does a translation, air is blown out through an outlet at the top.
As the mesh cells in the pure water region are compressed, the alpha goes well beyond one. Its value does not correspond to the inverse compression ratio precisely, but same order of magnitude... for the mesh volumes compressed to 75% of their initial volume the alpha1 value reaches 1.6. Any explanation for this ? Though the simulation does not blow up, it maintains this pretty unphysical level of alpha over hundreds of timesteps.
Is there something to add to our custom mesh motion routine to correct alpha1? In the style of the CorrectBoundary for the boundary motion ?
Questions over questions. Think we will not resolve them before the deadline of the students project which is tomorrow, but I am anyway interested in any input about the subject.

Cheers

Olivier

g.redondo December 16, 2009 11:06

k and omega too
 
As I was pasting nut and nutilda I will do the same with omega and k just in case someone finds the problem.

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 2 -2 0 0 0 0];

internalField uniform 0.0038;

boundaryField
{
OUTLET
{
type zeroGradient;
}
SYMMETRY
{
type symmetryPlane;
}
ATMOSPHERE
{
type inletOutlet;
inletValue uniform 0.0038;
value uniform 0.0038;
}
EXTRAHULL
{
type kqRWallFunction;
value uniform 0.0038;
}
INLET
{
type fixedValue;
value uniform 0.0038;
}
HULL
{
type kqRWallFunction;
value uniform 0.0038;
}
}


// ************************************************** *********************** //

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object omega;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 -1 0 0 0 0];

internalField uniform 4.38;

boundaryField
{
OUTLET
{
type zeroGradient;
}
SYMMETRY
{
type symmetryPlane;
}
ATMOSPHERE
{
type inletOutlet;
inletValue uniform 4.38;
value uniform 4.38;
}
EXTRAHULL
{
type omegaWallFunction;
value uniform 4.38;
}
INLET
{
type fixedValue;
value uniform 4.38;
}
HULL
{
type omegaWallFunction;
value uniform 4.38;
}
}


// ************************************************** *********************** //

hassan79 February 23, 2010 03:17

how can i deleted
 
hi how can i deleted
Quote:

Originally Posted by g.redondo (Post 240197)
Hi hassan,

I see that you're using Fluent. In order to keep things focused, it would be great if you can copy your post and make a new thread about it in the Fluent forum. There's lot of people there with more experience in that package willing to help you. Don't forget to remove it from here.

Regards,

Gonzalo


Curro5150 April 7, 2010 13:03

Hello,

May I ask how did you finally solve the problem for the forces?

If the forces library is easy to modify, I think a simple approach will be to neglect the aerodynamic drag by multiplying the forces on each cell by gamma before integration, but I have no idea of how to compile solvers.

Right now I am using the 1.5 distribution included in caelinux, I don't know if it is worth the effort to update to version 1.6.

Thanks in advance,

Francisco

hassan79 April 7, 2010 15:09

how can i remove plz
 
how can i remove plz
Quote:

Originally Posted by g.redondo (Post 240197)
Hi hassan,

I see that you're using Fluent. In order to keep things focused, it would be great if you can copy your post and make a new thread about it in the Fluent forum. There's lot of people there with more experience in that package willing to help you. Don't forget to remove it from here.

Regards,

Gonzalo


Hydro1004 April 17, 2010 01:38

Hello all,

I'm attempting to model a planing hull at the free surface of water.

I'm using rasInterFoam in v1.4.1 with k-omega SST turbulence modelling.

To get the boundary conditions right I'm trying to get a very simple case working (two-phase flow around a block at the air-water interface) with a constant velocity inlet (one inlet patch for air, one for water), a no-slip body and zeroGradient pd at the outlet and domain walls.

Unfortunately, after a few time steps the Courant number just increases and keeps increasing. It appears the problem starts around the interface.

I assume there's something wrong with my boundary conditions - what would be the recommended BCs? Has anyone else had this problem?

Any help would be gratefully received.

Regards,
Marion

hassan79 April 17, 2010 03:34

how can i remove plz
 
how can i remove plz

mohsenkh599 April 22, 2010 00:56

help
 
hi everyone
I have a new solver for two-phase modeling. but there is a problem while running any case (dam break for instance). when in ControlDict I put the write interval one second the solution diverge quickly but if I put it .05 second the solution converges. I could not understand how the write interval affects the convergence of the system.
please help as soon as possible

g.redondo April 23, 2010 13:11

What's the status of 1.6 validation? Has anyone managed to get a good agreement between 1.5 and 1.6 results with the new p formulation?

Eric, are you still running in 1.5? If the trend is to keep p instead of pd what's the plan?

Regards,

Gonzalo

Curro5150 April 23, 2010 13:40

Hi,

I am going to try to get something running within the next few days with 1.6, in order to see what happens... Not very optimistic about it though.
I finally did not manage to get the forces function working with 1.5, my version crashed... as did the original forces function, for some reason I got an error of "trying to read boynd EOF"... So I can not compare with 1.5 results unless I find a way of fixing this... any clues?

Regards,

Francisco

egp April 23, 2010 14:23

Hi Gonzalo,

I primarily use 1.5-dev, because of the fact that there is quite a bit of technology in the OpenFOAM-extend project that I find useful. However, I also have 1.6.x installed on my various machines.

With that said, I don't like working with total pressure because it mucks up the boundary conditions. As such, in 1.6, I've converted interFoam back to dynamic (or piezometric) pressure, which then permits use of zero-gradient conditions on pd.

Eric

g.redondo April 24, 2010 09:18

Thank you Eric,

It would be nice to know what the developers think about our problems with total pressure. I will give up with p and go back to 1.5, but I don't like to be working with something that might not be the trend in future versions. Anyway, the way it is right now is not an option.

Regards,

Gonzalo

g.redondo April 24, 2010 19:47

Hi Eric,

One more thing. Hope I'm not asking too much. Could you explain me how to convert in 1.6 back to dynamic pressure?

Best regards,

Gonzalo

flowris May 18, 2010 05:27

Face flux field
 
Dear all,


I tried the tutorial "wigley" by Prof. Paterson. If I am right, this one uses the non-turbulent interFoam solver from version 1.5.

In the the 0/ folder, the face flux field is already defined with nonuniform values in the internalField and on the boundaries XMIN and XMAX. Where do these values come from? And how can I define them myself for another simulation?

yannH June 4, 2010 05:20

3 Attachment(s)
Hi everyone,

I'm trying to get a simulation of wake from an stl file, and I have some troubles, my velocity becomes very high on the hull front very quickly, at 0.04s , may be someone could help me :

-- I have a 150 (-40 to 110 ) x 50 (w -25 to 25) x 30 (d -15 to 15) domain
-- My stl file is a little boat found on internet, ref BoatN100708
-- I use snappyHexMesh and my refinment level is quite good : level (5 6)
-- My boundary conditions for the boat are :
zerogradient for alpha1
fixedValue value uniform (0 0 0) for U
buoyantPressure for p
-- The water velocity is initialize to (-10 0 0) (so negative speed is normal)
-- I use interFoam

Here are the pictures, any ideas ?

g.redondo June 4, 2010 17:17

Hi yannH,

I would refine the mesh much more. Try to use a volumetric control at the free surface so you have more cells in there.

Enjoy,

Gonzalo

flowris June 7, 2010 03:31

Hi YahhH,


Did you split your domain in half? This is possible because I think you are working a symmetrical case, ans it will decrease computing time.

Which boundary conditions do you use on the other boundaries?

yannH June 7, 2010 05:14

Hi Gonzalo and flowris

thanks for reply,

Quote:

Originally Posted by g.redondo (Post 261750)
Try to use a volumetric control at the free surface so you have more cells in there

A volumetric control? I guess you mean to use simple grading . I'm looking for doing that

Quote:

Originally Posted by flowris (Post 261881)
Which boundary conditions do you use on the other boundaries?

I take

inlet : buoyantPressure for p, zeroGradient for alpha1, groovyBc for U (fixedValue (-10 0 0) below water surface, (0 0 0) above)

outlet, lowerwall, frontAndBack : buoyantPressure for p, zerogradient for U and alpha1

atmosphere : totalPressure for p , pressureInletOutletVelocity for U, inletOulet for alpha1

You're right, for a first step, I'll try the half of the domain.

Regards,

Yann

c_blake June 9, 2010 16:15

I was just wondering if anyone had been able to achieve quantatatively accurate results for the wigley hull yet, especially for the pressure forces. At the moment my pressure forces are about 20% too large (Froude 0.316).

openfoam_user June 10, 2010 06:55

Hi Chris,

Maybe it could be nice to create a new thread called 'wigley hull' where to share experience about this particular test case.

Are you using the grid of Prof. Eric Paterson ?
Which OpenFoam version are you using ?

- grid used (of Eric Patreson, structured, unstructured, sHM, ...)
- advices to improve the grid
- which OpenFOAM version
- settings (files in 0 directory)
- fvSchemes file
- fvSolution file
- tools (and tricks) to post-process the solution

Best regards,

Stephane.

c_blake June 13, 2010 16:18

Hi,
I am using a mesh that is semi structured (using blockMesh) but then have also used snappyHexMesh utility to add boundary layer cells, but not refinement (so the mesh is still conformal). The mesh is around 1.3million cells. I have used bouyantPresure as the pressure boundary condition for the hull. I am using version 1.6 of OpenFOAM.

flowris July 7, 2010 07:49

Hello all,


When I run the wigley case from Eric Paterson in OpenFOAM-1.5-dev, I get the following error:

keyword nu is undefined in dictionary "/home/jmatthei/OpenFOAM/jmatthei-1.5-dev/run/wigley/constant/transportProperties"

file: /home/jmatthei/OpenFOAM/jmatthei-1.5-dev/run/wigley/constant/transportProperties from line 29 to line 70.

From function dictionary::lookupEntry(const word& keyword) const
in file db/dictionary/dictionary.C at line 213.

FOAM exiting


However, when I make a simple blockMesh (the ship is now a bar) and use the same files, this error is no longer present. The keyword nu is indeed defined in constant/transportProperties, for both phases.


What is the problem?

nuovodna August 10, 2010 11:12

wigley on OF 170
 
Hi, i tried to set up wigley case by Eric Paterson (thanks for sharing!!) with interFoam 1.7.1 (laminar and ras). Now i d like to compare my results with some experimental data. Where can i found them?

Thanks in advance

colinB September 8, 2010 05:52

Hi

this morning I downloaded the wigleyship case from Eric Paterson and tried to run it under OF-1.7.1 with the icoFoam solver as recommended in the attached PDF.
Unfortunately it seems that the syntax has been changed in between and so I got the following error message:

Code:

Create time

Create mesh for time = 0

Reading field p_rgh



--> FOAM FATAL IO ERROR:
cannot open file

file: /root/OpenFOAM/root-1.7.1/run/tutorials/multiphase/interFoam/wigley/0/p_rgh at line 0.

    From function regIOobject::readStream()
    in file db/regIOobject/regIOobjectRead.C at line 61.

FOAM exiting

As previous in this thread suggested I replaced all pd's and gamma's by p's and alpha1's. I did this with the files in the 0 subdirectory as well as in the fvScheme file.
So actually I thought my problem was solved, but it just shortened the list of failures.
And for this last failure message I tried to find a file relating to this path but I couldn't find that either. Does anybody have any suggestions for solving this?
regards Colin

nuovodna September 8, 2010 06:08

wigley on OF 170
 
Hi Colin. I tried wigley by Eric Paterson on OF 171 with interFoam (icoFoam is a single phase solver). You can download the case that i setted up for OF 171:

http://db.tt/OoAhgCi


The main changes are on p_rgh (zeroGradient -> buoyantPressure) and on nut/nuTilda/k/epsilon (zeroGradient -> specific wall functions on the hull patch)

colinB September 8, 2010 07:19

Hi
thanks for your fast reply.
First I have to mention a typo of course I was talking about interFoam not icoFoam so exactly what you did was my intention.
Actually I thought I figured out what was wrong, I thought that the p_rgh the nut and the nuTilda files were missing, however that didn't fix it.

So I'm a little bit confused.
I'm assuming that I just have to type interFoam once I'm in the case directory you send me and that I nothing else have to execute, like blockMesh or what ever.

Edit: I hope I'm not wrong but I first run now setFields what resulted in an other error message and so I updated all the data in the setFieldsDict changing any gamma to alpha1 that fixed at least the setFields errors but I still cannot run interFoam, I have still the same error-message

Edit 2: Its running now. Failure was, beside some gammas instead of alpha1's, that as initial Timestep in the controlDict file there was a 30 and not a 0 and therefore the solver was constantly looking for the p_rgh file in the folder 30 and not 0.
However I go and get now some coffee and let the computer do his work ;)

nuovodna September 8, 2010 08:27

take a look in system/controlDict file... change startTime to 0 ( i forgot to change the value) then type interFoam and it should run. setFields is not required (alpha1 have been previously set on the entire domain)

egp September 8, 2010 08:46

I haven't been following this discussion much over the past several months due to workload. However, after the Overset Symposium later this month, I should have some time to fix the Wigley hull test case for 1.7.x.

Actually, I think it would be useful to collect a number of meshes and start building a repository for the Ship Hydro SIG over on the Extend Portal (http://www.extend-project.de/)

Eric

colinB September 8, 2010 10:02

Dear Eric
actually that is exactly what I planed (apart form the repository for SH SIG, but that can be arranged). Currently I'm trying to get a running system for ship hydrodynamic calculation and then test it on different cases.
If you have any hints for me I would appreciate them since I'm not an expert in OF nor in CFD.
regards Colin

nuovodna September 10, 2010 05:52

wigley on OF 17x and 1.5-dev
 
1 Attachment(s)
I made some tests on 1.5-dev and 1.7.x using wigley hull provided by Prof. Paterson (L=1, B=0.1, D=0.0625). The results are quite similar (I changed the boundary conditions on p_rgh (was pd) and k/epsilon/nut/nuTilda adding wallfunction on 1.7.x). The computation of forces in 1.5-dev required a modification of forces.C code like illustrated in this thread http://www.cfd-online.com/Forums/ope...es-of15-8.html post #152

But my results are away from the experimental data taken from this pdf :

http://www.shipmotions.nl/DUT/Papers...909-DUT-92.pdf (wigley III model)

My value of total drag forces on half hull is : 0,25 (pressure:0.062 viscous: 0.188) at Fr=0.316.
The drag coefficient results 8 * 10^-3 (2*F/0.5*rho*S*U^2) [note: the number "2" in front of F is necessary because the mesh includes half hull). I assume S is L*D*2 that is same order of the wetted surface.

Using the data provided with the previous pdf (L=3, B=0.3, D=0.1875, Resistence Force=9.97, Fr=0.3) i obtain a drag coefficient of 2.5*10^-3

This is the graph of forces obtained with 1.7.x.

I guess that viscous forces are overestimated. The pressure Force calculated in openFoam is close to the total Force given in the pdf. Certainly the Reynolds Number is different (L=1 and L=3) but I don't expect that it can explain a discrepancy like that.

These are the files of 1.7.x simulation

http://db.tt/7pVKy6R

colinB September 10, 2010 10:10

short note: could it be that the delft link is only for people who are at TU Delft?
For I couldn't enter the page and reducing the link to (...).nl/live tells me I don't have permission to go on this page.

nuovodna September 10, 2010 11:27

Link corrected

http://www.shipmotions.nl/DUT/Papers...909-DUT-92.pdf

nuovodna September 14, 2010 05:12

Results 1.7.x / 1.5-dev wigley
 
3 Attachment(s)
These are the results of X / Y / Z forces over the prof Paterson's wigley mesh

Ralph M October 6, 2010 05:17

Quote:

Originally Posted by nuovodna (Post 274721)
I made some tests on 1.5-dev and 1.7.x using wigley hull provided by Prof. Paterson (L=1, B=0.1, D=0.0625). The results are quite similar (I changed the boundary conditions on p_rgh (was pd) and k/epsilon/nut/nuTilda adding wallfunction on 1.7.x). The computation of forces in 1.5-dev required a modification of forces.C code like illustrated in this thread http://www.cfd-online.com/Forums/ope...es-of15-8.html post #152

But my results are away from the experimental data taken from this pdf :

www.shipmotions.nl/DUT/PapersReports/0909-DUT-92.pdf (wigley III model)

My value of total drag forces on half hull is : 0,25 (pressure:0.062 viscous: 0.188) at Fr=0.316.
The drag coefficient results 8 * 10^-3 (2*F/0.5*rho*S*U^2) [note: the number "2" in front of F is necessary because the mesh includes half hull). I assume S is L*D*2 that is same order of the wetted surface.

Using the data provided with the previous pdf (L=3, B=0.3, D=0.1875, Resistence Force=9.97, Fr=0.3) i obtain a drag coefficient of 2.5*10^-3

I started a few days ago with OF and did also the Wigley case. My results from OF are more or less the same as yours but I'm afraid that you made a mistake with calculating the drag coefficient from the towing tank? I get a result of 6.69*10^-3 with your method.

This is still not the same as the results from OF but there is a significant speed difference between the two cases (1m/s vs 1.63m/s) which increases the pressure resistance.

Regards,

Ralph

nuovodna October 6, 2010 10:43

cd computation
 
Hi Ralph, thanks for your reply. A question: what value of S do you put in C_d formula?? S= Lenght * Draft * 2?

Ralph M October 6, 2010 10:52

Yes, I used your method.

with a resistance of 9.97N, rho=1000, Vinf=1.6275m/s, L=3.0, T=0.1875 I get:

Cd=9.97/(0.5*1000*1.6275^2*(3*0.1875*2)=6.69*10^-3 for a Froude speed of 0.30

Cheers,

Ralph


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