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

[waves2Foam] Am I calculating the forces wrong?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 25, 2016, 11:30
Default Am I calculating the forces wrong?
  #1
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
Hi Niels and all wave2Foamers,

I am trying to run a case with regular waves and Re = 3900. I'm calculating the drag forces and plotting them to compare to Morison's equation. I'm attaching both plots (one from Morison's and one from my OpenFOAM values). I'm also attaching the plot I have for the drag coefficient.

I am completely off on all values (forces, pressures) so I am concluding that I am running waveFoam and calculating the forces wrong.

I would really appreciate some advice on where I'm going wrong. I'm banging my head off a wall trying to get out values that make sense! I'm attaching my systems directory and my blockMeshDict file as well.

Note: I have two relaxation zones (one inlet and one outlet)

EDIT: I've just plotted Ux, magU and vorticity to compare between one side and the other (x = 0, y = radius and x = 0, y = -radius) and am finding that the values for everything are higher on one side than the other... This makes no sense to me but I have been consistently finding that the flow is not symmetric, as it should be. So confused!


Thanks in advance for any advice!!

Ariel
Attached Images
File Type: png forces.png (50.5 KB, 48 views)
File Type: png forceCoeffs.png (46.1 KB, 46 views)
Attached Files
File Type: zip system.zip (9.5 KB, 11 views)
File Type: txt blockMeshDict.txt (12.1 KB, 6 views)

Last edited by arieljeds; March 25, 2016 at 11:56. Reason: Added some information
arieljeds is offline   Reply With Quote

Old   March 25, 2016, 13:41
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Ariel,

You have to upload your entire case, if we should be able to give any qualified help. Use e.g. Dropbox (or other places that does not require user registration).

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 25, 2016, 14:22
Default
  #3
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
Hi Niels,

Thanks a lot for the reply... sorry about that..


Here's the dropbox link to the whole case: https://www.dropbox.com/sh/wz97zpnd3...WbROFl1la?dl=0

Cheers,
Ariel
arieljeds is offline   Reply With Quote

Old   March 26, 2016, 04:05
Default
  #4
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Good morning Ariel,

I received an error while making the mesh, so I will simply describe my observations based on various text files. Though, please do attach the mesh in the future, so people do not have to construct it themselves.

Observations:

1. Your computational grid extends from z = -10 m to z = +5 m;

2. You have defined a depth of 25 m in waveProperties.input! This mismatch between '1' and '2' will definitely lead to unforeseen discrepancies. Likely to explain the bulk of your problems.

3. The coordinates 'startX' and 'endX' in waveProperties.input should only span the horizontal plane, e.g. set the vertical coordinates to 0. This definition could have resulted in weird looking relaxation zones and relaxation behaviour.

Good luck,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 26, 2016, 04:17
Default
  #5
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
Good morning, Niels! Thank you again for the reply... Ok yes I know that my depth is set to 25 m, but the reason I wanted to do this was just to save on vertical computational space but still calculate the wavelength correctly... I kind of assumed I could do this because of the slip condition on the bottom. Is there another way to avoid extending down the full 25 m? I'm guessing not though! I'm not at my computer with the proper mesh now but I will upload it when I am.

As per your advice on setting the relaxation zone to zero, is this for both the startX and endX? This would explain a lot that I wasn't understanding, perhaps!

Thanks again for your clear response!

Ariel
arieljeds is offline   Reply With Quote

Old   March 26, 2016, 04:23
Default
  #6
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Ariel,

The truncation of the domain in the depth requires accurate knowledge of the flow at the depth of truncation. In any case it is known that a slip condition is not the correct description (perhaps unless you are in deep water).

Effectively, you have generated waves with one wave length and the solution has tried to correct it to the wave length in 10 m of water, i.e. it can be thought of as some sort of violent shoaling.

Kind regards,

Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request.
ngj is offline   Reply With Quote

Old   March 29, 2016, 11:41
Default
  #7
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
Hi Niels,

Ok so basically the trick I was trying to do won't work then! I've broken the geometry into blocks for the free surface and blocks for below the free surface in order to grad the mesh towards the free surface. The case is currently running now.. One quick thing: When you mentioned before that you usually use the integrated forces, what did you mean by this?

On another note, I just attempted to run a case in parallel and am getting some really really weird looking results. It appears as though the flow is coming from both the inlet and the outlet? Is there some other way I should decompose the case? (Note: I haven't run anything in parallel before, so I may well be going far wrong somewhere!!)

Here's my decomposeParDict:

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

numberOfSubdomains 4;

method          simple;

simpleCoeffs
{
    n               ( 2 2 1 );
    delta           0.001;
}

hierarchicalCoeffs
{
    n               ( 1 1 1 );
    delta           0.001;
    order           xyz;
}

manualCoeffs
{
    dataFile        "";
}

distributed     no;

roots           ( );


// ************************************************************************* //
arieljeds is offline   Reply With Quote

Old   May 3, 2016, 02:54
Default
  #8
New Member
 
Maoyanjun
Join Date: Jan 2016
Posts: 20
Rep Power: 10
Maoyanjun is on a distinguished road
Quote:
Originally Posted by arieljeds View Post
Hi Niels and all wave2Foamers,

I am trying to run a case with regular waves and Re = 3900. I'm calculating the drag forces and plotting them to compare to Morison's equation. I'm attaching both plots (one from Morison's and one from my OpenFOAM values). I'm also attaching the plot I have for the drag coefficient.

I am completely off on all values (forces, pressures) so I am concluding that I am running waveFoam and calculating the forces wrong.

I would really appreciate some advice on where I'm going wrong. I'm banging my head off a wall trying to get out values that make sense! I'm attaching my systems directory and my blockMeshDict file as well.

Note: I have two relaxation zones (one inlet and one outlet)

EDIT: I've just plotted Ux, magU and vorticity to compare between one side and the other (x = 0, y = radius and x = 0, y = -radius) and am finding that the values for everything are higher on one side than the other... This makes no sense to me but I have been consistently finding that the flow is not symmetric, as it should be. So confused!


Thanks in advance for any advice!!

Ariel
Hello Ariel:
sorry for can't help you.but I find a question from your blockMeshDict.As I know ,In waveFoam,the gravity is set in the y axis. But form your case I think you have set the gravity in the z axis.How can you make it.did you change the wave generation boundary.
Maoyanjun is offline   Reply With Quote

Old   May 3, 2016, 04:56
Default
  #9
New Member
 
Maoyanjun
Join Date: Jan 2016
Posts: 20
Rep Power: 10
Maoyanjun is on a distinguished road
Quote:
Originally Posted by Maoyanjun View Post
Hello Ariel:
sorry for can't help you.but I find a question from your blockMeshDict.As I know ,In waveFoam,the gravity is set in the y axis. But form your case I think you have set the gravity in the z axis.How can you make it.did you change the wave generation boundary.
sorry to bother you,please ignore my question.I think I have know how to set the gravity in z -axis.
Maoyanjun is offline   Reply With Quote

Old   May 5, 2016, 07:14
Default
  #10
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
@Maoyanjun -- I'm sure you worked this out already but you just change the constant/g and constant/environmentalProperties files to have:

Code:
dimensions	[0 1 -2 0 0 0 0];
value		(0 0 -9.81);    // Note gravity is now set to 0 in the y direction and -9.81 in the z direction)
arieljeds 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
wrong value of forces in 2D simulation? DoQuocVu OpenFOAM Post-Processing 1 December 17, 2021 06:44
Pressure and density values to compute forces fernexda OpenFOAM Post-Processing 2 March 6, 2015 03:39
calculating forces from forceDensity achyutan OpenFOAM Running, Solving & CFD 0 August 6, 2013 07:37
Forces for airfoil test case Martin_ OpenFOAM Running, Solving & CFD 1 July 2, 2012 11:58
Valve Forces in CFdesign Mike Clapp Main CFD Forum 3 March 8, 2001 14:09


All times are GMT -4. The time now is 22:24.