CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [waves2Foam] Problems changing waveType from stokesFirst to others (https://www.cfd-online.com/Forums/openfoam-community-contributions/205841-problems-changing-wavetype-stokesfirst-others.html)

kenrichaiz June 13, 2016 02:50

Problems changing waveType from stokesFirst to others
 
Hello, I am running the waveFlume tutorial and I have an error while using the function setWaveParameters when I edit the wavetype from stokesFirst to other type of wave in waveProperties.input file. Not sure whether I'm doing it at a right way or not either because I'm very new in openfoam. The waveProperties.input file and the error are as below. Appreciate alot if I can get any help from anyone here. Thank you very much!
PHP Code:

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

seaLevel    0.00;

// A list of the relaxation zones in the simulation. The parameters are given
// in <name>Coeffs below.
relaxationNames (inlet outlet);

initializationName outlet;

inletCoeffs
{
    
// Wave type to be used at boundary "inlet" and in relaxation zone "inlet"
    
waveType    stokesSecond;  
    
    
// Ramp time of 2 s
    
Tsoft       2;

    
// Water depth at the boundary and in the relaxation zone
    
depth       0.400000;

    
// Wave period
    
period      2.0;

    
// Phase shift in the wave
    
phi         0.000000;

    
// Wave number vector, k. 
    
direction  (1.0 0.0 0.0);

    
// Wave height
    
height      0.1;
    
    
// Specifications on the relaxation zone shape and relaxation scheme
    
relaxationZone
    
{
        
relaxationScheme Spatial;
        
relaxationShape  Rectangular;
        
beachType        Empty;
    
        
relaxType   INLET;
        
startX      (0 0.0 -1);
        
endX        (5 0.0  1);
        
orientation      (1.0 0.0 0.0);
    }
};

outletCoeffs
{
    
waveType    potentialCurrent;
    
U           (0 0 0);
    
Tsoft       2;

    
relaxationZone
    
{
        
relaxationScheme Spatial;
        
relaxationShape  Rectangular;
        
beachType        Empty;    

        
relaxType   OUTLET;
        
startX      (13 0.0 -1);
        
endX        (18 0.0  1);
        
orientation      (1.0 0.0 0.0);
    }
};



// ************************************************************************* // 

PHP Code:

/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  3.0.1-119cac7e8750
Exec   
setWaveParameters
Date   
Jun 13 2016
Time   
14:28:58
Host   
"OECU"
PID    4282
Case   : /home/oecu/OpenFOAM/oecu-3.0.1/waves2Foam/tutorials/waveFoam/waveFlume
nProcs 
1
sigFpe 
Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking Monitoring run-time modified files using timeStampMaster
allowSystemOperations 
Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time


Reading g

Reading waveProperties


Constructing
stokesFirstProperties (Used by another wave theory)
ConstructingstokesSecondProperties


--> FOAM FATAL IO ERROR
keyword debug is undefined in dictionary "/home/oecu/OpenFOAM/oecu-3.0.1/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.input.inletCoeffs"

file: /home/oecu/OpenFOAM/oecu-3.0.1/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.input.inletCoeffs from line 28 to line 58.

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

FOAM exiting 


shanjiaogangkoumengfei September 28, 2018 05:18

on the use of waves2Foam other wave theories
 
Hello,Excuse me,i want to ask have you solved this problem? i also met it now
if you solved it,can you tell me? Thank you very much

JGadelho November 5, 2018 10:24

The error is very explicit:


keyword debug is undefined in dictionary "/home/oecu/OpenFOAM/oecu-3.0.1/waves2Foam/tutorials/waveFoam/waveFlume/constant/waveProperties.input.inletCoeffs"


Use your prefered editor to edit waveProperties.input


Under inletCoeffs add a variable called debug and give a boolean value (true or false).


In other words, add the green line as follows:



// Wave height
height 0.1;

debug true;


All times are GMT -4. The time now is 10:12.