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

[waves2Foam] IO error when running waveIsoFoam with OF1812: Dictionary entry not found

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2020, 22:10
Default IO error when running waveIsoFoam with OF1812: Dictionary entry not found
  #1
New Member
 
Jinshi Chen
Join Date: Jan 2020
Location: Cambridge, MA
Posts: 10
Rep Power: 6
JinshiC is on a distinguished road
Hi all,

I am currently trying to run waveIsoFoam, one of the new solver from waves2Foam, with OF1812. However, when I tested a case that I have successfully run with waveFoam on OF1712, I got the following error message:
Code:
[31] --> FOAM FATAL IO ERROR: 
[31] Dictionary entry for patch inlet not found
[31] 
[31] file: IOstream
[31] 
[31]     From function static Foam::autoPtr<Foam::waveModel> Foam::waveModel::New(const Foam::word&, const Foam::fvMesh&, const Foam::polyPatch&)
[31]     in file waveModel/waveModelNew.C at line 58.
Some times it would include a path in the error
Code:
[0] --> FOAM FATAL IO ERROR: 
[0] Dictionary entry for patch inlet not found
[0] 
[0] file: /vortexfs1/scratch/jinshichen/waveFlume_rand_kostab_topo_parallel_iso_run/processor0/constant/waveProperties
[0] 
[0]     From function static Foam::autoPtr<Foam::waveModel> Foam::waveModel::New(const Foam::word&, const Foam::fvMesh&, const Foam::polyPatch&)
[0]     in file waveModel/waveModelNew.C at line 58.
However, I do include the inlet properties in the waveProperties file, which is shown below:

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

seaLevel            4.5;
seaLevelAsReference true;

relaxationNames     ( inlet outlet );

initializationName  outlet;

inletCoeffs
{
    waveType            irregular;
    N                   50;       //Number of sampling frequencies
    Tsoft               30;        //Ramp time

    // Define the phases
    phaseMethod         randomPhase;

    // Define the spectrum
    spectrum            JONSWAP; 
    Hs                  0.8;      // Significant wave height
    Tp                  7;        // Peak wave period   
    gamma               3.3;      // Peak enhancement factor
    depth               4.5;      // Water depth
    direction           (1 0 0);
    
    frequencyAxis
    {
       discretisation       equidistantFrequencyAxis;

       lowerFrequencyCutoff 0.1;
       upperFrequencyCutoff 0.3;

       writeSpectrum        false;
    }

    relaxationZone
    {
        relaxationScheme    Spatial;
        relaxationShape     Rectangular;
        beachType           Empty;
        relaxType           INLET;
        startX              ( 0 0 0 );
        endX                ( 30 1 0 );
        orientation         ( 1 0 0 );
    }
}

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

    relaxationZone
    {
        relaxationScheme    Spatial;
        relaxationShape     Rectangular;
        beachType           Empty;
        relaxType           OUTLET;
        startX              ( 350.907 0 0 );
        endX                ( 370.907 1 0 );
        orientation         ( 1 0 0 );
    }
}



// ************************************************************************* //
Thus, I am wondering what is wrong with this code. Since I have successfully run the identical case with wavefoam solver on OF1712, I am wondering that whether there are some required syntax change when converting this to waveIsoFoam and OF1812? (I have changed the setting for isosurface part in the fvSolution, but I didn't change the rest).

My controlDict looks like the following:

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      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     interFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         10;

deltaT          0.001;

writeControl    adjustableRunTime;

writeInterval   0.05;

purgeWrite      6;

writeFormat     ascii;

writePrecision  6;

writeCompression uncompressed;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  yes;

maxCo           0.05;

maxAlphaCo      0.25;

maxDeltaT       1;



// ************************************************************************* //
Thank you in advance for all of your input on this!
JinshiC is offline   Reply With Quote

Old   March 22, 2020, 16:17
Default
  #2
New Member
 
Jinshi Chen
Join Date: Jan 2020
Location: Cambridge, MA
Posts: 10
Rep Power: 6
JinshiC is on a distinguished road
Hi all,

I have found a temporary fix: If you delete the "waveModel" library from EXE_LIB list in file "/waves2Foam/applications/solvers/solvers1812_PLUS/waveIsoFoam/Make/options" and recompile it, it should fix the problem. However I am still looking for a more thorough solution.

Thank you!

Best,
Jinshi
JinshiC is offline   Reply With Quote

Old   March 23, 2020, 12:25
Default
  #3
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
Hi Jinshi,

Thank you for reporting the bug. I have removed waveModels in Make/options and updated the repository. It is indeed a bug, because waveModels relate to the OpenFoam-ESI wave models and not waves2Foam.

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.
ngj is offline   Reply With Quote

Old   January 4, 2021, 11:08
Default ‘g’ was not declared in this scope
  #4
Member
 
le
Join Date: Nov 2009
Location: seoul
Posts: 34
Rep Power: 17
fsifsi is on a distinguished road
Quote:
Originally Posted by JinshiC View Post
Hi all,

I have found a temporary fix: If you delete the "waveModel" library from EXE_LIB list in file "/waves2Foam/applications/solvers/solvers1812_PLUS/waveIsoFoam/Make/options" and recompile it, it should fix the problem. However I am still looking for a more thorough solution.

Thank you!

Best,
Jinshi
Hello Jinshi
I try to combine interfoam and wavefoam in OF1812, but i got error when i wmake for new solver as:
/home/leqt/OpenFOAM/leqt-v1812/applications/utilities/waves2Foam/src/waves2Foam/lnInclude/readWaveProperties.H:27:38: error: ‘g’ was not declared in this scope
referencePoint.value() = g.value()/Foam::mag(g.value());
^

Could you tell me how to fix it, please.
Many thanks
fsifsi is offline   Reply With Quote

Old   January 4, 2021, 14:45
Default
  #5
New Member
 
Jinshi Chen
Join Date: Jan 2020
Location: Cambridge, MA
Posts: 10
Rep Power: 6
JinshiC is on a distinguished road
Hi Le,

I am not entirely sure what you did, and I didn't make a new solver my own (just using Niels' waveIsoFoam solver). However, it does seem to me that you have missed defining g (gravitational acceleration) somewhere in your model but have included it in the back end equation. I'd personally like to refer your question to other people who are more experienced that me.

Thank you!

Best,
Jinshi
JinshiC is offline   Reply With Quote

Old   May 12, 2021, 04:33
Default
  #6
Member
 
Rasmus Iwersen
Join Date: Jan 2019
Location: Denmark
Posts: 81
Rep Power: 8
Rasmusiwersen is on a distinguished road
Quote:
Originally Posted by JinshiC View Post
Hi all,

I have found a temporary fix: If you delete the "waveModel" library from EXE_LIB list in file "/waves2Foam/applications/solvers/solvers1812_PLUS/waveIsoFoam/Make/options" and recompile it, it should fix the problem. However I am still looking for a more thorough solution.

Thank you!

Best,
Jinshi
Perhaps a silly question.. But can you elaborate on how to peform the recompilation? I don't really know where to start...
Rasmusiwersen is offline   Reply With Quote

Old   January 4, 2022, 08:10
Default
  #7
FVP
New Member
 
Francisco Pinto
Join Date: Dec 2021
Posts: 4
Rep Power: 4
FVP is on a distinguished road
Hello everyone, I am using the OF2012 and I am facing the same problem as you. Do you know if the solution is the same as what you did for your OF version?
Did anyone face this problem with the OF2012?

Thank you in advance.
FVP is offline   Reply With Quote

Old   September 5, 2023, 12:51
Default
  #8
MFS
New Member
 
Manuel Fraga Seoane
Join Date: Jan 2020
Posts: 9
Rep Power: 6
MFS is on a distinguished road
Quote:
Originally Posted by ngj View Post
Hi Jinshi,

Thank you for reporting the bug. I have removed waveModels in Make/options and updated the repository. It is indeed a bug, because waveModels relate to the OpenFoam-ESI wave models and not waves2Foam.

Kind regards

Niels
Hi Niels,


First of all I would like to thank you for you great work with waves2Foam.



I guess you were talking about /solvers1812_PLUS/. I have realized that in the next version solvers (2012, 2106 and 2206) the "wave model" library is still in the options file. I was having the same error " Dictionary entry for patch inlet not found". Once I recompile without it, there is no error.


It is still a bug or am I missing something?


Kind regards,


Manuel
MFS is offline   Reply With Quote

Old   September 10, 2023, 18:39
Default
  #9
New Member
 
nf zhang
Join Date: Sep 2023
Posts: 1
Rep Power: 0
zhnf is on a distinguished road
Quote:
Originally Posted by MFS View Post
Hi Niels,


First of all I would like to thank you for you great work with waves2Foam.



I guess you were talking about /solvers1812_PLUS/. I have realized that in the next version solvers (2012, 2106 and 2206) the "wave model" library is still in the options file. I was having the same error " Dictionary entry for patch inlet not found". Once I recompile without it, there is no error.


It is still a bug or am I missing something?


Kind regards,


Manuel
Hi Seoane,

Could you elaborate the recompile process after you deleted the wavemodel library please? Thank you.
zhnf is offline   Reply With Quote

Old   September 11, 2023, 07:23
Default
  #10
MFS
New Member
 
Manuel Fraga Seoane
Join Date: Jan 2020
Posts: 9
Rep Power: 6
MFS is on a distinguished road
Hi Zhang,


Once I deleted the file, I just executed "wmake" command in ~/waves2Foam/applications/solvers/solvers2206_PLUS/my_new_solver/


I followed the instructions given in the waves2Foam manual.


I don't know if I have already solve your doubt...


Kind regards,


Manuel
MFS is offline   Reply With Quote

Reply

Tags
dictionary, syntax, waveisofoam, waves2foam


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
Unknown function type pressureTools Dorian1504 OpenFOAM Post-Processing 23 May 25, 2021 10:24
Regarding FoamX running Kindly help out hariya03 OpenFOAM Pre-Processing 0 April 18, 2008 05:26
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 05:15
FoamX error aachenBomb case Ervin Adorean (Adorean) OpenFOAM Pre-Processing 13 March 7, 2005 04:50


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