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

[waves2Foam] have some confusion about the parameter Tsoft

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 20, 2015, 07:10
Default have some confusion about the parameter Tsoft
  #1
Member
 
Xiantao Zhang
Join Date: Nov 2014
Posts: 31
Rep Power: 11
zhxter is on a distinguished road
Hi, foamers.
I am now using the waves2foam and have some confusion about the parameter Tsoft.

For the stokesfirst wave theory (see stokesfirst.C)


// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //


scalar stokesFirst::factor(const scalar& time) const
{
scalar factor(1.0);
if (Tsoft_ > 0.0)
{
factor = Foam::sin(2*PI_/(4.0*Tsoft_)*Foam::min(Tsoft_, time));
}

return factor;
}


scalar stokesFirst::eta
(
const point& x,
const scalar& time
) const
{
scalar eta = H_/2.0*Foam::cos(omega_*time - (k_ & x) + phi_)
*factor(time) + seaLevel_;
return eta;
}

Why the defintion of wave elevation eta is multiplied by the factor(time) ?? I can understand it when the value of factor(time) equals to 1. But if Tsoft>0, then the value of factor(time) is no longer equal to 1. In such cases, the value of eta is not correct??
zhxter is offline   Reply With Quote

Old   January 21, 2015, 15:34
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
Good evening,

It has been some time since my last reply, so I will try to wrap everything up:

@Xiantoo: Try plotting the function factor(const scalar& time) and you will see that it goes from zero to one over the interval Tsoft.

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.

Last edited by wyldckat; October 8, 2018 at 09:32. Reason: removed answer to another post that was on the main thread
ngj 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
[PyFoam] running pyFoam(Plot)Runner.py in parallel Studi OpenFOAM Community Contributions 10 September 6, 2015 16:38
meshing of a compound volume in GMSH shawn3531 OpenFOAM 4 March 12, 2015 10:45
Force can not converge colopolo CFX 13 October 4, 2011 22:03
compile errors of boundary condition "expDirectionMixed" liying02ts OpenFOAM Bugs 2 February 1, 2010 20:11
MAxium residual...confusion with expert parameter KK CFX 3 February 8, 2008 10:47


All times are GMT -4. The time now is 04:29.