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

[waves2Foam] Force calculation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2015, 07:10
Default Force calculation
  #1
Member
 
Join Date: Dec 2009
Posts: 49
Rep Power: 16
katakgoreng is on a distinguished road
Hi Niels,

Do you have any experience using the function object to calculate force and moment due to waves?
I tried using the following function object
Code:
functions
{

    forces
    {
        type            	forces;
        functionObjectLibs 	("libforces.so");
        outputControl   	timeStep;
        outputInterval  	2;
        patches        		(cylinder);
        pName       		p_rgh;
        UName       		U;
        log         		true;
	rhoName			rho;
        rhoInf      		1000;
	nuInf			1e-6;
        CofR        		( 0 0 -1.2 );
    }
}
and got the following error:

Code:
--> FOAM FATAL IO ERROR: 
keyword nu is undefined in dictionary "/Works/WALL_COARSE/constant/transportProperties"

file: /Works/WALL_COARSE/constant/transportProperties from line 25 to line 37.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 402.

FOAM exiting
My transport properties dictionary is as follows

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      transportProperties;
}

phase1
{
    transportModel  Newtonian;
    nu              nu [ 0 2 -1 0 0 0 0 ] 1e-06;
    rho             rho [ 1 -3 0 0 0 0 0 ] 1000;
}

phase2
{
    transportModel  Newtonian;
    nu              nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
    rho             rho [ 1 -3 0 0 0 0 0 ] 1;
}

sigma           sigma [1 0 -2 0 0 0 0] 0.07;
Kind regards,
katakgoreng
katakgoreng is offline   Reply With Quote

Old   February 27, 2015, 06:58
Default
  #2
New Member
 
Jorge Gadelho
Join Date: Feb 2013
Posts: 22
Rep Power: 13
JGadelho is on a distinguished road
Hello katakgoren,

I believe you have to define nu and rho before phase1 and phase2.

Try to add the red lines before phase1 in transporte properties:


Code:
transportModel  Newtonian;   
nu              nu [ 0 2 -1 0 0 0 0 ] 1e-06; 
rho             rho [ 1 -3 0 0 0 0 0 ] 1000; 

phase1 
{     
transportModel  Newtonian;     
nu              nu [ 0 2 -1 0 0 0 0 ] 1e-06;     
rho             rho [ 1 -3 0 0 0 0 0 ] 1000; 
}  
phase2 
{     
transportModel  Newtonian;     
nu              nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;     
rho             rho [ 1 -3 0 0 0 0 0 ] 1; 
}
JGadelho is offline   Reply With Quote

Old   February 27, 2015, 12:04
Default
  #3
Member
 
carlos
Join Date: Apr 2011
Posts: 37
Rep Power: 15
CFD-Palma is on a distinguished road
Hi katakgoren,

In my case it works and I have only two differences:

In transportproperties after sigma
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;

In Controldict I do not have reference to nu:

forces
{
type forces;
functionObjectLibs ("libforces.so");
patches (hull);
rhoName rho;
rhoInf 1025;
CofR (2.5 0 0.25);
outputControl timeStep;//outputTime;//
outputInterval 100;
log true;
}

Regards,
Carlos.
CFD-Palma is offline   Reply With Quote

Old   March 5, 2015, 06:12
Default
  #4
Member
 
Join Date: Dec 2009
Posts: 49
Rep Power: 16
katakgoreng is on a distinguished road
Many thanks for the help.
katakgoreng 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
Force Calculation nofrizal CFX 9 March 28, 2019 07:14
Force Calculation in OpenFOAM for Propeller case bmaldi OpenFOAM Running, Solving & CFD 2 May 2, 2018 05:33
Lift force and Drag force calculation KTJ STAR-CCM+ 3 April 29, 2014 09:38
Force report every iteration in unsteady flow calculation Friso Landstra FLUENT 0 October 23, 2009 08:13
Warning 097- AB Siemens 6 November 15, 2004 05:41


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