Home > wafo > wavemodels > thsnlpdf2.m

thsnlpdf2

PURPOSE ^

Joint (Scf,Hd) PDF for nonlinear waves with Torsethaugen spectra.

SYNOPSIS ^

[f,varargout] = thsnlpdf2(Hd,Scf,Hm0,Tp,normalizedInput)

DESCRIPTION ^

 THSNLPDF2 Joint (Scf,Hd) PDF for nonlinear waves with Torsethaugen spectra. 
  
   CALL: f = thsnlpdf2(Hd,Scf,Hm0,Tp) 
   
    f   = pdf struct evaluated at meshgrid(Scf,Hd) 
    Hd  = zero down crossing wave height (vector) 
    Scf = crest front steepness (vector)  
    Hm0 = significant wave height [m] 
    Tp  = Spectral peak period    [s] 
  
  THSNLPDF2 approximates the joint distribution of (Scf, Hd), i.e., crest 
  steepness (2*pi*Ac/(g*Td*Tcf)) and wave height, for 2nd order 
  nonlinear waves with a 
  Torsethaugen spectral density. The empirical parameters of the model is 
  fitted by least squares to simulated (Scf,Hd) data for 600 classes of 
  Hm0 and Tp. Between 40000 and 200000 zero-downcrossing waves were 
  simulated for each class of Hm0 and Tp. 
  THSNLPDF is restricted to the following range for Hm0 and Tp:  
   0.5 < Hm0 [m] < 12,  3.5 < Tp [s] < 20,  and  Hm0 < (Tp-2)*12/11. 
  
  Example: 
  Hm0 = 6;Tp = 8; 
  h = linspace(0,4*Hm0/sqrt(2));  
  s = linspace(0,6*1.25*Hm0/Tp^2); 
  f = thsnlpdf2(h,s,Hm0,Tp); 
  w = linspace(0,40,5*1024+1).'; 
  S = torsethaugen(w,[Hm0 Tp]); 
  dt = 0.3;   
  x = spec2nlsdat(S,80000,.2); rate = 8; 
  [si,hi] = dat2steep(x,rate,2); 
  fk = kdebin([si,hi],'epan',[],[],.5,128); 
   fk.title = f.title; fk.labx = f.labx;  
  plot(si,hi,'.'), hold on 
  pdfplot(f),pdfplot(fk,'r'),hold off 
  
  See also  thsspdf

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

001 function [f,varargout] = thsnlpdf2(Hd,Scf,Hm0,Tp,normalizedInput) 
002 %THSNLPDF2 Joint (Scf,Hd) PDF for nonlinear waves with Torsethaugen spectra. 
003 % 
004 %  CALL: f = thsnlpdf2(Hd,Scf,Hm0,Tp) 
005 %  
006 %   f   = pdf struct evaluated at meshgrid(Scf,Hd) 
007 %   Hd  = zero down crossing wave height (vector) 
008 %   Scf = crest front steepness (vector)  
009 %   Hm0 = significant wave height [m] 
010 %   Tp  = Spectral peak period    [s] 
011 % 
012 % THSNLPDF2 approximates the joint distribution of (Scf, Hd), i.e., crest 
013 % steepness (2*pi*Ac/(g*Td*Tcf)) and wave height, for 2nd order 
014 % nonlinear waves with a 
015 % Torsethaugen spectral density. The empirical parameters of the model is 
016 % fitted by least squares to simulated (Scf,Hd) data for 600 classes of 
017 % Hm0 and Tp. Between 40000 and 200000 zero-downcrossing waves were 
018 % simulated for each class of Hm0 and Tp. 
019 % THSNLPDF is restricted to the following range for Hm0 and Tp:  
020 %  0.5 < Hm0 [m] < 12,  3.5 < Tp [s] < 20,  and  Hm0 < (Tp-2)*12/11. 
021 % 
022 % Example: 
023 % Hm0 = 6;Tp = 8; 
024 % h = linspace(0,4*Hm0/sqrt(2));  
025 % s = linspace(0,6*1.25*Hm0/Tp^2); 
026 % f = thsnlpdf2(h,s,Hm0,Tp); 
027 % w = linspace(0,40,5*1024+1).'; 
028 % S = torsethaugen(w,[Hm0 Tp]); 
029 % dt = 0.3;   
030 % x = spec2nlsdat(S,80000,.2); rate = 8; 
031 % [si,hi] = dat2steep(x,rate,2); 
032 % fk = kdebin([si,hi],'epan',[],[],.5,128); 
033 %  fk.title = f.title; fk.labx = f.labx;  
034 % plot(si,hi,'.'), hold on 
035 % pdfplot(f),pdfplot(fk,'r'),hold off 
036 % 
037 % See also  thsspdf 
038  
039    
040 % Reference   
041 % P. A. Brodtkorb (2004),   
042 % The Probability of Occurrence of Dangerous Wave Situations at Sea. 
043 % Dr.Ing thesis, Norwegian University of Science and Technolgy, NTNU, 
044 % Trondheim, Norway.    
045    
046 % History 
047 % revised pab 09.08.2003 
048 % changed input   
049 % validated 20.11.2002 
050 % By pab 20.12.2000 
051  
052 error(nargchk(4,5,nargin)) 
053  
054 if (nargin < 5|isempty(normalizedInput)),  normalizedInput  = 0;end 
055 if (nargin < 4|isempty(Tp)),  Tp  = 8;end 
056 if (nargin < 3|isempty(Hm0)), Hm0 = 6;end 
057  
058  
059 [V,H] = meshgrid(Scf,Hd); 
060  
061 f = createpdf(2); 
062 [f.f,Hrms,Vrms,varargout{1:nargout-1}]  = thsnlpdf(H,V,Hm0,Tp,normalizedInput); 
063  
064  f.x = {Scf(:),Hd(:)}; 
065   
066 if (normalizedInput) 
067   f.labx={'Scf', 'Hd'}; 
068   f.norm = 1; 
069 else 
070   f.norm=0; 
071   f.labx={'Scf', 'Hd [m]'}; 
072 end 
073 f.title = 'Joint distribution of (Hd,Scf) in time (non-linear)'; 
074 f.note = ['Torsethaugen Hm0=' num2str(Hm0) ' Tp = ' num2str(Tp)]; 
075 [f.cl,f.pl] = qlevels(f.f); 
076  
077 return  
078

Mathematical Statistics
Centre for Mathematical Sciences
Lund University with Lund Institute of Technology

Comments or corrections to the WAFO group


Generated on Thu 06-Oct-2005 02:21:16 for WAFO by m2html © 2003