<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<link type="text/css" rel="stylesheet" href="doxygen.css"/>
		<link type="text/css" rel="stylesheet" href="tabs.css"/>
	</head>
	<body>
	<div>
<!-- Generated by Doxygen 1.8.5 -->
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Appendix A: Frequently Asked Questions </div>  </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#faq_modelling">Modelling</a><ul><li class="level2"><a href="#faq_modelling_pip">Recommendations regarding pipe-in-pipe modelling</a><ul><li class="level3"><a href="#faq_modelling_pip_general">General recommendations</a></li>
<li class="level3"><a href="#faq_modelling_pip_input">Input parameters</a></li>
<li class="level3"><a href="#faq_modelling_pip_recommended">Recommended default values</a></li>
<li class="level3"><a href="#faq_modelling_pip_gloading">Recommended static loading sequence</a></li>
<li class="level3"><a href="#faq_modelling_pip_efficient">Tips for efficient analysis with pipe-in-pipe</a></li>
</ul>
</li>
<li class="level2"><a href="#faq_modelling_transfer">Transfer functions - roll, pitch and yaw</a><ul><li class="level3"><a href="#faq_modelling_transfer_conversion">Conversion example:</a></li>
<li class="level3"><a href="#faq_modelling_transfer_linux">Linux script for conversion of rao values:</a></li>
</ul>
</li>
<li class="level2"><a href="#faq_modelling_example">Example MATLAB script to generate a 3D seafloor grid</a><ul><li class="level3"><a href="#faq_modelling_example_ifundi">iFundi.m</a></li>
<li class="level3"><a href="#faq_modelling_example_seafloor">seafloor.m</a></li>
</ul>
</li>
</ul>
</li>
<li class="level1"><a href="#faq_analysis">Analysis</a><ul><li class="level2"><a href="#faq_analysis_work">Work array size in STAMOD, DYNMOD and OUTMOD</a></li>
<li class="level2"><a href="#faq_analysis_maximum">Maximum number of arrays on the ifnsta, ifnirr and ifndyn files</a></li>
<li class="level2"><a href="#faq_analysis_transforming">Transforming time series on file ifndyn</a></li>
<li class="level2"><a href="#faq_analysis_setting">Setting environment variables on Windows</a></li>
<li class="level2"><a href="#faq_analysis_running">Running Linux scripts on Windows</a></li>
</ul>
</li>
<li class="level1"><a href="#faq_extracting">Extracting Results</a><ul><li class="level2"><a href="#faq_extracting_reading">Reading RIFLEX results in MATLAB</a><ul><li class="level3"><a href="#faq_extracting_reading_get">get_matrix.m</a></li>
</ul>
</li>
<li class="level2"><a href="#faq_extracting_utility">Utility programs for STARTIMES files</a></li>
<li class="level2"><a href="#faq_extracting_stress">Stress time series</a></li>
</ul>
</li>
<li class="level1"><a href="#faq_licensing">Licensing</a><ul><li class="level2"><a href="#faq_licensing_getting">Getting the FLEXlm HOSTID of a PC</a></li>
<li class="level2"><a href="#faq_licensing_specifying">Specifying the FLEXlm license server or file on Windows</a></li>
<li class="level2"><a href="#faq_licensing_error">FLEXlm error: Terminal Server remote client not allowed</a></li>
<li class="level2"><a href="#faq_licensing_trouble">Troubleshooting FLEXlm license server problems</a></li>
</ul>
</li>
<li class="level1"><a href="#faq_riflex">RIFLEX for Windows Utility</a><ul><li class="level2"><a href="#faq_riflex_specifying">Specifying program modules in RIFLEX for Windows</a></li>
<li class="level2"><a href="#faq_riflex_error">Run-time error 9: subscript out of range</a></li>
</ul>
</li>
<li class="level1"><a href="#faq_linux">Linux</a><ul><li class="level2"><a href="#faq_linux_specifying">Specifying the FLEXlm license server or file on Linux</a></li>
<li class="level2"><a href="#faq_linux_setting">Setting Environment variables on Linux</a></li>
</ul>
</li>
</ul>
</div>
<div class="textblock"><h1><a class="anchor" id="faq_modelling"></a>
Modelling</h1>
<h2><a class="anchor" id="faq_modelling_pip"></a>
Recommendations regarding pipe-in-pipe modelling</h2>
<h3><a class="anchor" id="faq_modelling_pip_general"></a>
General recommendations</h3>
<p>The contact between the master pipe and the slave pipe will be applied between a node on the master pipe and an element in the slave pipe. This results in nodal loads along the master pipe and discrete element loads along the slave pipe. This is similar to the roller contact which is described in the Theory Manual.</p>
<p>The contact stiffness, specified as stiffness per unit length along the master pipe, should be chosen large enough, but not stiffer than necessary. When selecting the stiffness it may be useful to consider penetration for a characteristic force, e.g. weight.</p>
<p>A relatively high stiffness proportional damping may be needed to damp out the high natural frequencies caused by stiff contact elements.</p>
<p>The contact force does not contribute to bending moment on the element level. Thus the number of elements in the master and slave pipe should be chosen large enough to reflect the occurring distributed forces.</p>
<p>Note that the contact points in the master pipe are placed at the first end of each element plus an additional contact point at the second end of the last element. If the inner diameter of the master pipe varies, this may not give the desired contact radius at the node where the radius changes. This may be avoided by specifying a separate pipe-in-pipe contact for each segment of the master pipe.</p>
<h3><a class="anchor" id="faq_modelling_pip_input"></a>
Input parameters</h3>
<ul>
<li><code>Master position :</code> The position of the master pipe in the pipe-in-pipe contact pair. This option decides if the outer or inner pipe should be the master pipe. The contact between the master pipe and the slave pipe will be applied between a node on the master pipe and an element in the slave pipe. This results in nodal loads along the master pipe and discrete element loads along the slave pipe. The number of artificial contact elements is equal to number of nodes in the master pipe.</li>
<li><code>Stiffness type :</code> Either constant (linear), or non-linear contact compression stiffness between the master and slave pipe. In the latter case, a table of force/displacement pairs must be entered. The contact stiffness, specified as stiffness per unit length along the master pipe, should be chosen large enough, but not stiffer than necessary. Very high stiffness values may lead to long run-times, instability and high-frequency numerical noise. When selecting the stiffness it may be useful to consider penetration for a characteristic force and also the convergence of the results that are of interest.</li>
<li><code>Relative damping level :</code> Relative damping at estimated eigenperiod in the master, slave and contact spring system.</li>
<li><code>Damping :</code> damping coefficient per unit length of master pipe</li>
<li><code>Spring stiffness :</code> associated with static friction coefficient : The stiffness used when loading friction forces.</li>
<li><code>Axial friction switch :</code> This swith controls if the axial friction between master and slave is included.</li>
<li><code>Rotational friction switch :</code> This swith controls if the rotational friction between master and slave is included.</li>
<li><code>Velocity limit :</code> for change from static to dynamic friction</li>
</ul>
<h3><a class="anchor" id="faq_modelling_pip_recommended"></a>
Recommended default values</h3>
<p>The following are recommended default values for setting up a typical pipe-in pipe analysis. It is recommended to always do a parameter variation after setting up a model to ensure convergence of results and that damping does not affect modes of interest. Only a small amount of axial friction is included in the suggested input to improve convergence (compared to turning axial friction off).</p>
<h4>Pipe in pipe parameters</h4>
<table class="doxtable">
<tr>
<th>Parameter </th><th>Recommended value </th><th>Unit  </th></tr>
<tr>
<td>Master position </td><td>Outer </td><td>(-) </td></tr>
<tr>
<td>Stiffness type </td><td>Linear </td><td>(-) </td></tr>
<tr>
<td>Linear spring stiffness </td><td>1e+5 </td><td>(N/m^2) </td></tr>
<tr>
<td>Relative damping </td><td>0.7-1.0 </td><td>(-) </td></tr>
<tr>
<td>Damping </td><td>0.0 </td><td>(Ns/m^2) </td></tr>
<tr>
<td>Friction stiffness </td><td>2.0e+6 </td><td>(N/m) </td></tr>
<tr>
<td>Static friction coefficient </td><td>1e-3 </td><td>(-) </td></tr>
<tr>
<td>Dynamic (sliding) friction coefficient </td><td>1e-3 </td><td>(-) </td></tr>
<tr>
<td>Axial friction switch </td><td>ON </td><td>(-) </td></tr>
<tr>
<td>Rotational friction switch </td><td>OFF </td><td>(-) </td></tr>
<tr>
<td>Velocity limit </td><td>0.1 </td><td>(m/s) </td></tr>
</table>
<h4>Global dynamic calculation parameters</h4>
<table class="doxtable">
<tr>
<th>Parameter </th><th>Recommended value </th><th>Unit  </th></tr>
<tr>
<td>Global stiffness proportional damping factor</td><td>0.001 </td><td>(-) </td></tr>
</table>
<h3><a class="anchor" id="faq_modelling_pip_gloading"></a>
Recommended static loading sequence</h3>
<p>To improve convergence in the static analysis, it is not recommended to include pipe-in-pipe contact forces as the first load group. Loading Volume forces, initially pre-stressed segments etc. before pip-in-pipe forces will in most cases improve static convergence.</p>
<h3><a class="anchor" id="faq_modelling_pip_efficient"></a>
Tips for efficient analysis with pipe-in-pipe</h3>
<ul>
<li>Set Pipe-in-pipe contact to "entered" in static calculation parameters. The internal pipe does not have to be placed in the exact centre, or even inside of the external pipe, it will be pulled towards the centre when the contact forces are applied.</li>
<li>Load Volume forces before pipe-in-pipe forces. This will in many cases make the application of contact forces much more stable due to the additional drag forces and weight.</li>
<li>Setting the external pipe as master will often improve convergence and run-times.</li>
<li>It is recommended to use shorter elements in the master pipe. The opposite may lead to slower convergence and numerical noise.</li>
<li>Note that the element mesh of the master pipe controls the number of contact elements and should therefore be chosen carefully with regards to convergence of results and speed. Use a refined mesh where necessary, for example in areas where large curvatures and contact is expected, inside bellmouths/guide-tubes, flexjoints etc. Run times increase exponentially with number of elements in pipe-in-pipe pairs, so it is important to keep number of elements to a minimum, but sufficient to ensure convergence of key results.</li>
<li>Use linear contact stiffness and start off with a low stiffness for stability and increase gradually if needed.</li>
<li>For a typical application, drilling-riser, an element length of 2-3 m for both the drillpipe and marine riser will be sufficient. In areas where the drillpipe is bent and large contact forces are expected (for example around flex-joints/ball-joints), the element length should be reduced.</li>
<li>External contact radius of inner pipe must be larger than zero</li>
<li>If the master position is "outer", all segments in the slave(inner) pipe segments must have external contact radius which is smaller than the internal contact radius of the outer(master) pipe and larger than zero.</li>
<li>If the master position is "inner", all segments in the master (inner) pipe segments must have external contact radius which is smaller than the internal contact radius of the outer(slave) pipe and larger than zero.</li>
</ul>
<h2><a class="anchor" id="faq_modelling_transfer"></a>
Transfer functions - roll, pitch and yaw</h2>
<p>In <code>RIFLEX</code> vessel roll, pitch and yaw are given as rotation per wave slope; i.e. dimensionless. If values are available as rotation per meter or foot of wave height, a conversion must be performed.</p>
<h3><a class="anchor" id="faq_modelling_transfer_conversion"></a>
Conversion example:</h3>
<pre>
Input to RIFLEX is pitch per wave slope.</pre><pre>First we need the wave number
k0 = w*w/g  (deep water)
T=14 s
w=2*PI/T=0.4488 rad/s
g=32.185 ft/s^2
gives k0=0.006258</pre><pre>k = w*w/g * 1/tanh(k*h) (finite water depth)</pre><pre>water depth 4000'
Using the deep water value k0 as a starting value in the iteration gives:
0.006258 ... i.e. water is deep for this wave period</pre><pre>Back to the trf ratio:</pre><pre>0.2518 degrees per foot wave amplitude
= 0.2518 * 2*PI/360. rad/foot amp
= 0.004395 rad/foot amp</pre><pre>Max wave slope is k*amp so</pre><pre>= 0.004395 rad/foot amp /(0.006258 slope per foot amp)
= 0.702277 rad pitch / rad slope</pre><pre>is input to RIFLEX
</pre><h3><a class="anchor" id="faq_modelling_transfer_linux"></a>
Linux script for conversion of rao values:</h3>
<div class="fragment"><div class="line"><span class="preprocessor">#! /usr/bin/awk -f</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#  Expects input as:    freq(rad/s)  trf(rad/m)     phase</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#  and gives output as: freq(rad/s)  trf(rad/rad)   phase</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#  Waterdepth may be given on the command line;</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#      convert_trf &#39;d=100.0&#39; &lt;infile&gt;</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#</span></div>
<div class="line"><span class="preprocessor"></span></div>
<div class="line">BEGIN { d = 310.0; g = 9.81}</div>
<div class="line"></div>
<div class="line">  NF  { w = $1; i = 0;</div>
<div class="line">          k0 = 0.0; k1 = w*w/g;</div>
<div class="line"><span class="preprocessor">#       print i, k1;</span></div>
<div class="line"><span class="preprocessor"></span>        <span class="keywordflow">while</span> ( (k1-k0) &gt; 0.00005 || (k0-k1) &gt; 0.00005 ) </div>
<div class="line">           { i++;</div>
<div class="line">             k0   = k1;</div>
<div class="line">             x    = k0*d;</div>
<div class="line">             tanh = 1.0;</div>
<div class="line">             <span class="keywordflow">if</span> (x &lt; 50.) tanh = (exp(x)-exp(-x))/(exp(x)+exp(-x))</div>
<div class="line">             k1   = w*w/(g*tanh);</div>
<div class="line"><span class="preprocessor">#            print i, k1</span></div>
<div class="line"><span class="preprocessor"></span>           }</div>
<div class="line">        print $1,$2/k1,$3</div>
<div class="line">      }</div>
</div><!-- fragment --><h2><a class="anchor" id="faq_modelling_example"></a>
Example MATLAB script to generate a 3D seafloor grid</h2>
<p>The MATLAB scripts <code>iFundi.m</code> and <code>seafloor.m</code> may be used to generate a regular spaced grid of 3D seafloor data. seafloor.m includes the set of (x,y,z) coordinates that define the 3D seafloor.</p>
<h3><a class="anchor" id="faq_modelling_example_ifundi"></a>
iFundi.m</h3>
<div class="fragment"><div class="line">%</div>
<div class="line">%                                   iFundi</div>
<div class="line">%                                   ______</div>
<div class="line">%  </div>
<div class="line">% MATLAB script that generates a RIFLEX seafloor input file, on the basis of</div>
<div class="line">% column based data.</div>
<div class="line">%</div>
<div class="line">% This script is a basis, which is expected to be modified by the user when needed.</div>
<div class="line">%</div>
<div class="line">% Philippe Maincon, MARINTEK, 28/6/2000</div>
<div class="line">%</div>
<div class="line">clear                                                % Clear MATLAB<span class="stringliteral">&#39;s memory, to</span></div>
<div class="line"><span class="stringliteral">                                                     % avoid surprises</span></div>
<div class="line"><span class="stringliteral">% Read the seafloor data</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">seafloor;                                            % call the script in file</span></div>
<div class="line"><span class="stringliteral">                                                     % seafloor.m, which defines 3</span></div>
<div class="line"><span class="stringliteral">                                                     % vectors x,y and z, of same</span></div>
<div class="line"><span class="stringliteral">                                                     % size.</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">% Define the grid to be generated                                                     </span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">Xsmin = 540;                                         % define the grid to be</span></div>
<div class="line"><span class="stringliteral">DGX   = .5;                                          % generated</span></div>
<div class="line"><span class="stringliteral">Xsmax = 650;                                         % x values on the grid to be</span></div>
<div class="line"><span class="stringliteral">Ysmin = 80;                                          % between Xsmin and Xsmax, with</span></div>
<div class="line"><span class="stringliteral">DGY   = .5;                                          % step DGX</span></div>
<div class="line"><span class="stringliteral">Ysmax = 140;</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">% Create the interpolated grid</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">[b,a]=meshgrid(Ysmin:DGY:Ysmax,Xsmin:DGX:Xsmax);     % for the purpose of</span></div>
<div class="line"><span class="stringliteral">                                                     % interpolation, generate the</span></div>
<div class="line"><span class="stringliteral">                                                     % matrices a and b of x and y</span></div>
<div class="line"><span class="stringliteral">                                                     % data respectively, for each</span></div>
<div class="line"><span class="stringliteral">                                                     % point of the grid.</span></div>
<div class="line"><span class="stringliteral">                                                     % DO NOT switch a and b, x and</span></div>
<div class="line"><span class="stringliteral">                                                     % y. !!!</span></div>
<div class="line"><span class="stringliteral">c=griddata(x,y,z,a,b,&#39;</span>linear<span class="stringliteral">&#39;);                      % interpolate z data to grid c</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">% Plot the result - for feedback to the user</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">figure(1); clf; hold on;axis equal;                  </span></div>
<div class="line"><span class="stringliteral">mesh(a,b,c);                                         % plot the interpolated grid as</span></div>
<div class="line"><span class="stringliteral">                                                     % a &quot;mesh&quot;</span></div>
<div class="line"><span class="stringliteral">plot3(x,y,z,&#39;</span>k.<span class="charliteral">&#39;,&#39;</span>markersize<span class="stringliteral">&#39;,3);                    % plot the original data as</span></div>
<div class="line"><span class="stringliteral">                                                     % black dots</span></div>
<div class="line"><span class="stringliteral">grid;                                                % put a grid as background to</span></div>
<div class="line"><span class="stringliteral">                                                     % the plot</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">% Write the RIFLEX seafloor input file</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">depth=round(c*100);</span></div>
<div class="line"><span class="stringliteral">[NGX,NGY]=size(depth)</span></div>
<div class="line"><span class="stringliteral">fnut=char(39);zero=0</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">file=fopen(&#39;</span>bottom.rif<span class="charliteral">&#39;,&#39;</span>w<span class="stringliteral">&#39;);                        % You can change the name of</span></div>
<div class="line"><span class="stringliteral">                                                     % the file here</span></div>
<div class="line"><span class="stringliteral">fprintf(file,&#39;</span>%s\n<span class="charliteral">&#39;,&#39;</span>Sample seabed profile<span class="stringliteral">&#39;);        % the syntax here is that of</span></div>
<div class="line"><span class="stringliteral">                                                     % C language</span></div>
<div class="line"><span class="stringliteral">fprintf(file,&#39;</span>%s %s\n<span class="stringliteral">&#39;,fnut,&#39;</span>NGX NGY Xsmin Xsmax Ysmin Ysmax DGX DGY<span class="stringliteral">&#39;);</span></div>
<div class="line"><span class="stringliteral">% Mind that a RIFLEX input file is never to have more than 80 columns...</span></div>
<div class="line"><span class="stringliteral">fprintf(file,&#39;</span>%4d %4d %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f\n<span class="stringliteral">&#39;,...</span></div>
<div class="line"><span class="stringliteral">              NGX,NGY,Xsmin,Xsmax,Ysmin,Ysmax,DGX,  DGY);</span></div>
<div class="line"><span class="stringliteral">fprintf(file,&#39;</span>%s %s\n<span class="stringliteral">&#39;,fnut,&#39;</span>XOS YOS ANGOL<span class="stringliteral">&#39;);</span></div>
<div class="line"><span class="stringliteral">fprintf(file,&#39;</span>%8.2f %8.2f %8.2f\n<span class="stringliteral">&#39;,zero,zero,zero);</span></div>
<div class="line"><span class="stringliteral">fprintf(file,&#39;</span>%s %s\n<span class="stringliteral">&#39;,fnut,&#39;</span>Depth of seabed [ul*100]<span class="stringliteral">&#39;);</span></div>
<div class="line"><span class="stringliteral">for col = 1:NGY</span></div>
<div class="line"><span class="stringliteral">   for lin =1:NGX-1</span></div>
<div class="line"><span class="stringliteral">      fprintf(file,&#39;</span>%8d %s\n<span class="stringliteral">&#39;,depth(lin,col),&#39;</span>&amp;<span class="stringliteral">&#39;);</span></div>
<div class="line"><span class="stringliteral">   end</span></div>
<div class="line"><span class="stringliteral">   fprintf(file,&#39;</span>%8d \n<span class="stringliteral">&#39;,depth(NGX,col));</span></div>
<div class="line"><span class="stringliteral">end   </span></div>
<div class="line"><span class="stringliteral">fclose(file);</span></div>
<div class="line"><span class="stringliteral"></span></div>
<div class="line"><span class="stringliteral">%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%</span></div>
</div><!-- fragment --><h3><a class="anchor" id="faq_modelling_example_seafloor"></a>
seafloor.m</h3>
<div class="fragment"><div class="line">tmp=[  46318.500     62176.000    -134.0976</div>
<div class="line">   46319.500     62176.000    -134.0722 </div>
<div class="line">   46320.500     62176.000    -134.0749 </div>
<div class="line">   46321.500     62176.000    -134.0644 </div>
</div><!-- fragment --><p> [...] </p>
<div class="fragment"><div class="line">   46427.125     62283.000    -126.0274 </div>
<div class="line">   46428.125     62283.000    -125.9467];</div>
<div class="line"></div>
<div class="line">x = tmp(:,1)-tmp(1,1);</div>
<div class="line">y = tmp(:,2)-tmp(1,2);</div>
<div class="line">z = tmp(:,3);</div>
<div class="line">clear tmp;</div>
<div class="line">r1 = x&lt;400;</div>
<div class="line">r2 = x&gt;400;</div>
</div><!-- fragment --><h1><a class="anchor" id="faq_analysis"></a>
Analysis</h1>
<h2><a class="anchor" id="faq_analysis_work"></a>
Work array size in STAMOD, DYNMOD and OUTMOD</h2>
<p>The size of the work arrays may be specified using the environment variables <code>RIFLEX_STAMOD_MEM</code>, <code>RIFLEX_DYNMOD_MEM</code> and <code>RIFLEX_OUTMOD_MEM</code>. The variables give the size in million Bytes, i.e. 4 times the number of million integer words. The minimum size is 4 and the maximum size is 800. From <code>RIFLEX</code> 3.6.17 / 3.7.25 the maximum size is increased to 1600. The value used is echoed on the <code>.res</code> file.</p>
<p>The default size of the <code>STAMOD</code> work array is 4 million integer words. This corresponds to specifying 16.</p>
<p>The default size of the <code>DYNMOD</code> work array is 8 million integer words. This corresponds to specifying 32.</p>
<p>The work array in <code>OUTMOD</code> may be specified in <code>RIFLEX</code> versions 3.4.7 and higher. The default size of the <code>OUTMOD</code> work array is 8 million integer words. This corresponds to specifying 32.</p>
<p>The procedure for setting environmental variables is described in <a class="el" href="a00018.html#faq_analysis_setting">Setting Environment variables on Windows</a> and <a class="el" href="a00018.html#faq_linux_setting">Setting Environment variables on Linux</a>.</p>
<p>The <code>RIFLEX</code> for Windows utility should be restarted after setting the environment variables.</p>
<h2><a class="anchor" id="faq_analysis_maximum"></a>
Maximum number of arrays on the ifnsta, ifnirr and ifndyn files</h2>
<p>The maximum number of arrays on the <code>ifnsta</code>, <code>ifnirr</code> and <code>ifndyn</code> files may be specified using the environment variables <code>RIFLEX_MAXSTA_IFNSTA</code>, <code>RIFLEX_MAXIRR_IFNIRR</code> and <code>RIFLEX_MAXDYN_IFNDYN</code>. The values used are echoed on the <code>_stamod.res</code> or <code>_dynmod.res</code> file.</p>
<p>The minimum size of <code>RIFLEX_MAXSTA_IFNSTA</code> is 2000 and the maximum is 2000000. The default is 20000.</p>
<p>The minimum size of <code>RIFLEX_MAXIRR_IFNIRR</code> is 100 and the maximum is 100000. The default is 2000.</p>
<p>The minimum size of <code>RIFLEX_MAXDYN_IFNDYN</code> is 50000 and the maximum is 2000000. The default is 200000.</p>
<p>The procedure for setting environmental variables is described in <a class="el" href="a00018.html#faq_analysis_setting">Setting Environment variables on Windows</a> and <a class="el" href="a00018.html#faq_linux_setting">Setting Environment variables on Linux</a>.</p>
<p>The <code>RIFLEX</code> for Windows utility should be restarted after setting the environment variables.</p>
<h2><a class="anchor" id="faq_analysis_transforming"></a>
Transforming time series on file ifndyn</h2>
<p>After completing the time domain simulation, <code>DYNMOD</code> reads stored displacements, forces and curvature back from the <code>ifndyn</code> file and extracts times series which are then stored on the <code>ifndyn</code> file for subsequent use by <code>OUTMOD</code>. This will cause a lot of file IO if storage is specified for many response quantities at many time steps and may be very time consuming.</p>
<p>Depending on the available space in the <code>DYNMOD</code> work array, <code>DYNMOD</code> may not be able to transform the time series for all stored nodes / elements at the same time. Check the <code>dynmod.res</code> file for information about the time series transformation, e.g. for a very small test case:</p>
<div class="fragment"><div class="line">Transforming displacements to time series in</div>
<div class="line">1 groups of 50 nodes/elements each</div>
<div class="line">took 0.06 s (wall clock time)</div>
</div><!-- fragment --><p>If the transformation is split in many groups, increasing the size of the <code>DYNMOD</code> work array may help (ref FAQ <a class="el" href="a00018.html#faq_analysis_work">Work array size in STAMOD, DYNMOD and OUTMOD</a>).</p>
<p>The amount of data transformed may be reduced by not storing response for nodes / elements that are not needed for post-processing in <code>OUTMOD</code>; e.g. for presentation of times series, response statistics, fatigue damage, distance time series. Note that one can obtain minima, maxima, mean, standard deviation and estimated period on the <code>dynmod.mpf</code> file even if the response quantities are not stored.</p>
<p>If the transformation remains unacceptably time consuming, a solution may be to run the simulation twice. The initial simulation may either be a shorter simulation with full storage or a long simulation without storage. The response quantities of interest may then be selected from the time series or from the key response on the <code>mpf</code> file and the simulation rerun storing only the selected response.</p>
<h2><a class="anchor" id="faq_analysis_setting"></a>
Setting environment variables on Windows</h2>
<p>Environmental variables may be used to specify work array size or the maximum number of arrays on files, see <a class="el" href="a00018.html#faq_analysis_work">Work array size in STAMOD, DYNMOD and OUTMOD</a> and <a class="el" href="a00018.html#faq_analysis_maximum">Maximum number of arrays on the ifnsta, ifnirr and ifndyn files</a>. If not set, default values will be used by <code>RIFLEX</code>. For example to increase the <code>DYNMOD</code> work array to twice the default size, set <code>RIFLEX_DYNMOD_MEM</code> to 64.</p>
<p>On Windows 7:</p>
<ol type="1">
<li>Click on Start at the lower left corner of the screen</li>
<li>Right mouse click on Computer in the right hand column</li>
<li>Choose Properties at the bottom of the menu that pops up</li>
<li>Choose Advanced System Settings at the bottom left of the System window</li>
<li>Choose Environment Variables at bottom right</li>
<li>Set the desired variables</li>
<li>Choose OK to save the settings</li>
<li>Restart any command line window in order to update your environment</li>
</ol>
<h2><a class="anchor" id="faq_analysis_running"></a>
Running Linux scripts on Windows</h2>
<p>The CYGWIN package (<a href="http://www.cygwin.com/">http://www.cygwin.com/</a>) will enable you to run Linux-style shell scripts on your Windows machine.</p>
<h1><a class="anchor" id="faq_extracting"></a>
Extracting Results</h1>
<h2><a class="anchor" id="faq_extracting_reading"></a>
Reading RIFLEX results in MATLAB</h2>
<p>The contents of the binary additional result files from <code>DYNMOD</code> may be read:</p>
<div class="fragment"><div class="line">fid=fopen(<span class="stringliteral">&#39;noddis.bin&#39;</span>);</div>
<div class="line">F=fread(fid,[156 500],<span class="stringliteral">&#39;float32&#39;</span>);</div>
<div class="line">F=F<span class="stringliteral">&#39;;</span></div>
</div><!-- fragment --><p>The binary additional result files contain two columns more than the corresponding ASCII files. For <code>RIFLEX</code> version before <code>RIFLEX</code> 3.6.7 (or development versions before 3.7.8), please add 1 to the specified column number and note that an extra column appears after the described columns with data. For <code>RIFLEX</code> 3.6.7 (3.7.8) and higher, the column numbers on the key file are correct.</p>
<p>ASCII file; e.g <code>.res</code> and <code>.mpf</code> files; may be read using fscanf: </p>
<div class="fragment"><div class="line">fid = fopen(<span class="stringliteral">&#39;armour_sa_ANGLES_outmod.res&#39;</span>);</div>
<div class="line">fseek(fid,5176,<span class="stringliteral">&#39;bof&#39;</span>);</div>
<div class="line">angle1=fscanf(fid,<span class="stringliteral">&#39;%g %g %g %g %g %g &#39;</span>,[6,600]);</div>
<div class="line">fseek(fid,766,<span class="stringliteral">&#39;cof&#39;</span>);</div>
<div class="line">angle2=fscanf(fid,<span class="stringliteral">&#39;%g %g %g %g %g %g &#39;</span>,[6,600]);</div>
<div class="line">status = fclose(fid);</div>
</div><!-- fragment --><p>Matrices on a <code>.mpf</code> file may alternatively be read using get_matrix.m.</p>
<h3><a class="anchor" id="faq_extracting_reading_get"></a>
get_matrix.m</h3>
<div class="fragment"><div class="line"><span class="keyword">function</span> matrix=get_matrix(mpffile,title)</div>
<div class="line"></div>
<div class="line">%   Matlab <span class="keyword">function</span> to <span class="keyword">get</span> the matrices that match the <span class="keywordtype">string</span> title</div>
<div class="line">%   from the mpf file mpffile.</div>
<div class="line">%</div>
<div class="line"></div>
<div class="line">% *** Open mpf file</div>
<div class="line">fid = fopen(mpffile,<span class="charliteral">&#39;r&#39;</span>);</div>
<div class="line"></div>
<div class="line"></div>
<div class="line">% *** Read entire file into character <span class="keywordtype">string</span></div>
<div class="line"></div>
<div class="line">filetext = fscanf(fid,<span class="stringliteral">&#39;%c&#39;</span>);</div>
<div class="line">fclose(fid);</div>
<div class="line"></div>
<div class="line">nlen = length(filetext);</div>
<div class="line"></div>
<div class="line"></div>
<div class="line">% *** Find start of all matrices on file + dummy pointer at end</div>
<div class="line">ixmat = findstr(<span class="stringliteral">&#39;MATRIX&#39;</span>,filetext);</div>
<div class="line">nmat = length(ixmat);</div>
<div class="line">ixmat(nmat+1) = nlen;</div>
<div class="line"></div>
<div class="line"></div>
<div class="line">% *** Find start of all matrices of <span class="stringliteral">&quot;title&quot;</span></div>
<div class="line">text = [ <span class="stringliteral">&#39;MATRIX    &#39;</span> , title ];</div>
<div class="line">ix0 = findstr(text,filetext);</div>
<div class="line">nmat = length(ix0);</div>
<div class="line"></div>
<div class="line"></div>
<div class="line">% *** Get matrices from file</div>
<div class="line"></div>
<div class="line">nlin = 0;</div>
<div class="line"><span class="keywordflow">for</span> i=1:nmat</div>
<div class="line"></div>
<div class="line">%  fprintf(1,<span class="stringliteral">&#39;%s \n&#39;</span>, filetext(ix0(i):ix0(i)+60));</div>
<div class="line"></div>
<div class="line">   % Find which matrix</div>
<div class="line">   imat=find(ixmat == ix0(i));</div>
<div class="line"></div>
<div class="line">   % Start of values - add 10 to skip <span class="stringliteral">&#39;VALUES    &#39;</span></div>
<div class="line">   ix1 = ixmat(imat) + findstr(<span class="stringliteral">&#39;VALUES&#39;</span>,filetext(ixmat(imat)+1:ixmat(imat+1))) + 10;</div>
<div class="line"></div>
<div class="line">   % Values end at start of next matrix</div>
<div class="line">   ix2 = ixmat(imat+1) - 1;</div>
<div class="line"></div>
<div class="line">   values = str2num(filetext(ix1:ix2));</div>
<div class="line"></div>
<div class="line">   <span class="keywordflow">if</span> (i  == 1)</div>
<div class="line">     all_values = shiftdim(values,1);</div>
<div class="line">   <span class="keywordflow">else</span></div>
<div class="line">   all_values = [ all_values , shiftdim(values,1) ];</div>
<div class="line">   end</div>
<div class="line"></div>
<div class="line">end</div>
<div class="line"></div>
<div class="line"></div>
<div class="line">matrix = shiftdim(all_values,1);</div>
</div><!-- fragment --><h2><a class="anchor" id="faq_extracting_utility"></a>
Utility programs for STARTIMES files</h2>
<p>The utility program <code>prtsc</code> may be used to list the contents of a Startimes file.</p>
<p>The utility program <code>tsprn</code> may be used to extract time series from a Startimes file.</p>
<p>SINTEF Ocean customers may download the utilities from the MSE e-room.</p>
<h2><a class="anchor" id="faq_extracting_stress"></a>
Stress time series</h2>
<p>Stress time series from <code>OUTMOD</code> are available in two ways:</p>
<ul>
<li>Printed on the <code>_outmod.res</code> file if <code>PRINT</code> is specified and <code>STARTIMES</code> is not specified</li>
<li>Stored in Startimes format on on the <code>_outmod.ts</code> file if <code>STARTIMES</code> is specified</li>
</ul>
<p>If stored in Startimes format, time series may be viewed / accessed in several ways:</p>
<ul>
<li>Using the utility MatrixPlot</li>
<li>Converted to ASCII format using the utility TSPRN (see Utility programs for STARTIMES files below)</li>
<li>Port-processed using the Startimes package for time series</li>
</ul>
<h1><a class="anchor" id="faq_licensing"></a>
Licensing</h1>
<h2><a class="anchor" id="faq_licensing_getting"></a>
Getting the FLEXlm HOSTID of a PC</h2>
<p>The <code>RIFLEX</code> FLEXlm license file is generated for a specific computer, which is identified by its HOSTID. The HOSTID is the MAC address of the primary network card of the PC where the software will be run.</p>
<p>The easiest way to get the MAC address is to run the command '<code>ipconfig/all &gt;out.txt</code>' from the DOS command prompt. The <code>out.txt</code> file may be opened with a text editor, e.g. Notepad. The MAC address is given by the variable '<code>Physical Address</code>' (12 alphanumeric characters). Mobile PCs will normally have several network cards and thus several MAC addresses - chose the MAC address under 'Local Area Connection', not the one under 'Wireless'.</p>
<p>On Windows 7 the DOS command prompt may be started by choosing Start, Search programs and files and then typing <code>cmd</code>.</p>
<p>On Windows XP the DOS command prompt may be started by choosing Start, Run and then typing <code>cmd</code>. Alternatively, chose Start, All Programs, Accessories and finally Command Prompt.</p>
<p>Send the <code>out.txt</code> file or the MAC address to your license provider so that they can generate a license file.</p>
<h2><a class="anchor" id="faq_licensing_specifying"></a>
Specifying the FLEXlm license server or file on Windows</h2>
<p>The first time <code>RIFLEX</code> is run on a PC a dialog will appear and the user may specify a license server or a file location.</p>
<p>Choose and specify either a license server, e.g. '<code>2002@riflex.marin.ntnu.no</code>' (for non-commercial student use at NTNU) or chose license file and browse to select the license file on your computer, e.g. '<code>C:\SINTEF\ntnu_larsen.lic</code>'</p>
<p>The specified license server or file will then be stored with other registry information. To change the specified FLEXlm server or file, choose <code>START</code>, <code>Run</code>, <code>regedit</code>, <code>HKEY_LOCAL_MACHINE</code>, <code>SOFTWARE</code> and then <code>FLEXlm license manager</code>. Click with the right mouse button on <code>MARINTEK_LICENSE_FILE</code> and choose <code>modify</code> or <code>delete</code>.</p>
<p>Several license files or a combination of license files and license servers may be specified by giving a list with semicolons (;) between the entries, e.g. '<code>C:\SINTEF\ntnu_larsen.lic;@gimli</code>'</p>
<h2><a class="anchor" id="faq_licensing_error"></a>
FLEXlm error: Terminal Server remote client not allowed</h2>
<p>Standalone uncounted licenses are intended for single user use on the PC with the specified HOSTID. They can therefore not be used via remote desktop. The solution is to acquire a server license.</p>
<h2><a class="anchor" id="faq_licensing_trouble"></a>
Troubleshooting FLEXlm license server problems</h2>
<p>The first step is to check with the IT staff that the license server is running and that the <code>RIFLEX</code> / <code>VIVANA</code> license has been installed.</p>
<p>The second step is to check the specification of the license server on the computer attempting to run <code>RIFLEX</code> / <code>VIVANA</code>. See <a class="el" href="a00018.html#faq_licensing_specifying">Specifying the FLEXlm license server or file on Windows</a> (or <a class="el" href="a00018.html#faq_linux_specifying">Specifying the FLEXlm license server or file on Linux</a>). The entry should be set to <code>@</code> and the name of the license server machine, e.g. <code>@moses</code> or <code>@moses.marintek.sintef.no</code>. It is normally not necessary to specify the port, so don't give a number before the <code>@</code>. Remove any old references to other license servers and/or license files.</p>
<p>The third step is to run the diagnostic utility lmdiag. On Windows start a Command Prompt by choosing <code>START</code>, <code>All Programs</code>, <code>Accessories</code> and finally <code>Command Prompt</code>. Run </p>
<div class="fragment"><div class="line">lmutil lmdiag -c @SERVER -n RIFLEX_INPMOD</div>
</div><!-- fragment --><p> replacing <code>SERVER</code> with the name of your license server. This will allow you to check your connection with the license server and whether the <code>RIFLEX</code> / <code>VIVANA</code> license has been successfully installed. You may alternatively run </p>
<div class="fragment"><div class="line">lmutil lmdiag -c @SERVER -n</div>
</div><!-- fragment --><p> to obtain a list of licenses that are available from the server.</p>
<p>When the specified license is available, a "This license can be checked out" message will appear. Note that a number of "No licenses for ... " messages may also appear in the list, e.g.</p>
<div class="fragment"><div class="line">lmutil - Copyright (c) 1989-2003 by Macrovision Corporation. All rights reserved.</div>
<div class="line">FLEXlm diagnostics on Tue 11/11/2008 11:26</div>
<div class="line"></div>
<div class="line">-----------------------------------------------------</div>
<div class="line">License file: 27000@moses</div>
<div class="line">-----------------------------------------------------</div>
<div class="line">No licenses <span class="keywordflow">for</span> RIFLEX_INPMOD in <span class="keyword">this</span> license file</div>
<div class="line">-----------------------------------------------------</div>
<div class="line">License file: 27001@moses</div>
<div class="line">-----------------------------------------------------</div>
<div class="line"><span class="stringliteral">&quot;RIFLEX_INPMOD&quot;</span> v1.0, vendor: MARINTEK</div>
<div class="line">License server: moses</div>
<div class="line">floating license expires: 15-jan-2009</div>
<div class="line"></div>
<div class="line">This license can be checked out</div>
<div class="line">-----------------------------------------------------</div>
<div class="line">-----------------------------------------------------</div>
<div class="line">License file: 27002@moses</div>
<div class="line">-----------------------------------------------------</div>
<div class="line">No licenses <span class="keywordflow">for</span> RIFLEX_INPMOD in <span class="keyword">this</span> license file</div>
</div><!-- fragment --><p>Trying to obtain a license that is not available results in only "No licenses for..." messages for all ports.</p>
<p>Specifying an unreachable server name will result in only the first two lines of text; the line with the lmutul copyright information and the current date and time.</p>
<h1><a class="anchor" id="faq_riflex"></a>
RIFLEX for Windows Utility</h1>
<h2><a class="anchor" id="faq_riflex_specifying"></a>
Specifying program modules in RIFLEX for Windows</h2>
<p>The location of the <code>RIFLEX</code> program modules is stored on the <code>RIFLEX4Win.INI</code> file which is located on the same directory as <code>RIFLEX4Win.exe</code>. If the location is not specified on the <code>RIFLEX4Win.INI</code> file, e.g., when <code>RIFLEX</code> for Windows is started for the first time, the location is set to <code>RIFLEX_HOME\bin</code> using the environmental variable <code>RIFLEX_HOME</code>. The <code>INI</code> file <code>RIFLEX4Win.INI</code> is updated when <code>RIFLEX</code> for Windows is closed.</p>
<p>The location may thus be reset by replacing the <code>RIFLEX4Win.INI</code> file, resetting the <code>RIFLEX_HOME</code> environmental variable and then restarting <code>RIFLEX</code> for Windows. The <code>RIFLEX4Win.INI</code> file may be re-downloaded or edited by the user.</p>
<p>Overwriting the <code>INI</code> file may also be necessary if the directory where <code>RIFLEX</code> was last run is no longer available.</p>
<p>Alternatively, the path to the executables may be specified in <code>RIFLEX</code> for Windows. Select <code>Options</code> and then <code>Programs</code> and set the correct folder name for <code>HOME</code> and the individual program modules <code>INPMOD</code>, <code>STAMOD</code>, ... .</p>
<p>The same procedure is applicable for <code>VIVANA</code> for Windows. This allows the user to have separate <code>RIFLEX</code> and <code>VIVANA</code> installations, using the correct <code>INPMOD</code> and <code>STAMOD</code> modules in each.</p>
<h2><a class="anchor" id="faq_riflex_error"></a>
Run-time error 9: subscript out of range</h2>
<p>This error message indicates that <code>RIFLEX</code> for Windows cannot find the expected key data for plotting. It is usually caused by empty or incomplete <code>.mpf</code> files and may occur after running an analysis or when starting <code>RIFLEX</code> for Windows or selecting a new directory.</p>
<p>The immediate remedy is usually to delete the offending files with the <code>mpf</code> suffix on the directory.</p>
<p>Check the <code>RIFLEX</code> / <code>VIVANA</code> <code>.res</code> files to see if the problem is caused by an error in the analysis; e.g. the analysis has been interrupted or failed. It may also occur after a successful analysis if no plots were stored on the <code>.mpf</code> file; e.g. pure Catenary <code>STAMOD</code> analyses, static analyses with the parameter <code>IFILFM = 0</code>, dynamic simulations that are shorter than the specified start time for response envelope calculation or where envelopes are not calculated or stored. Please check the <code>STAMOD</code> data group <code>STAMOD CONTROL INFORMATION</code> and the <code>DYNMOD</code> data groups <code>ENVELOPE CURVE SPECIFICATION</code> and <code>REGWAVE PRINT OPTIONS</code>.</p>
<h1><a class="anchor" id="faq_linux"></a>
Linux</h1>
<h2><a class="anchor" id="faq_linux_specifying"></a>
Specifying the FLEXlm license server or file on Linux</h2>
<p>Before running <code>RIFLEX</code> for the first time the environment variable <code>MARINTEK_LICENSE_FILE</code> must be set to the license server or file location, e.g. </p>
<div class="fragment"><div class="line">MARINTEK_LICENSE_FILE=<span class="stringliteral">&quot;@flexlm&quot;</span></div>
</div><!-- fragment --> <div class="fragment"><div class="line">MARINTEK_LICENSE_FILE=<span class="stringliteral">&quot;/home/ep/riflex_test.lic&quot;</span></div>
</div><!-- fragment --><p> or (for non-commercial student use at NTNU) </p>
<div class="fragment"><div class="line">MARINTEK_LICENSE_FILE=<span class="stringliteral">&quot;2002@riflex.marin.ntnu.no&quot;</span></div>
</div><!-- fragment --><p>This value will be stored on the file <code>.flexlmrc</code> in the user's home directory the first time one runs <code>RIFLEX</code>. This file may later be edited if necessary.</p>
<p>Several license files or a combination of license files and license servers may be specified by giving a list with semicolons (;) between the entries, e.g., </p>
<div class="fragment"><div class="line">MARINTEK_LICENSE_FILE=<span class="stringliteral">&quot;/home/ep/riflex_test.lic;@flexlm&quot;</span></div>
</div><!-- fragment --><h2><a class="anchor" id="faq_linux_setting"></a>
Setting Environment variables on Linux</h2>
<p>Environmental variables be used to specify work array size or the maximum number of arrays on files, see <a class="el" href="a00018.html#faq_analysis_work">Work array size in STAMOD, DYNMOD and OUTMOD</a> and <a class="el" href="a00018.html#faq_analysis_maximum">Maximum number of arrays on the ifnsta, ifnirr and ifndyn files</a>. If not set, default values will be used by <code>RIFLEX</code>. For example to increase the <code>DYNMOD</code> work array to twice the default size.</p>
<p>To set in a Bourne / Korn / Bash shell </p>
<div class="fragment"><div class="line">export RIFLEX_DYNMOD_MEM=<span class="stringliteral">&quot;500&quot;</span></div>
</div><!-- fragment --> </div></div><!-- contents -->
	</body>
</html>