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

[IHFOAM] The IHFOAM Thread

Register Blogs Community New Posts Updated Threads Search

Like Tree57Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 8, 2014, 08:58
Default
  #61
Member
 
Hao Chen
Join Date: Aug 2014
Posts: 66
Rep Power: 0
hchen is on a distinguished road
I reinstall the system to make sure foam extend install correctly with openmpi.
But then I rerun irregular45degreeTanks, then I get:
Code:
[hchen-OptiPlex-9020:22570] *** An error occurred in MPI_Recv
[hchen-OptiPlex-9020:22570] *** on communicator MPI_COMM_WORLD
[hchen-OptiPlex-9020:22570] *** MPI_ERR_TRUNCATE: message truncated
[hchen-OptiPlex-9020:22570] *** MPI_ERRORS_ARE_FATAL: your MPI job will now abort
--------------------------------------------------------------------------
mpirun has exited due to process rank 2 with PID 22569 on
node hchen-OptiPlex-9020 exiting improperly. There are two reasons this could occur:

1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.

2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"

This may have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
[hchen-OptiPlex-9020:22566] 3 more processes have sent help message help-mpi-errors.txt / mpi_errors_are_fatal
[hchen-OptiPlex-9020:22566] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages
Simulation complete.
strange....
hchen is offline   Reply With Quote

Old   October 9, 2014, 02:39
Default
  #62
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Hao,

regarding your first post, I think OpenFOAM is not correctly installed, there are some libraries that are not compiled, so dummy ones get called. Please, follow the instructions provided by OpenFOAM or found in this forum to install the version you have on your system.

Regarding the second post, this is a known issue, check this out:

http://openfoamwiki.net/index.php/Contrib/IHFOAM#Supported_Versions


The solution is easy: edit $WM_PROJECT_DIR/etc/controlDict and change commsType to nonBlocking

Best,

Pablo
Phicau is offline   Reply With Quote

Old   October 9, 2014, 14:16
Default
  #63
Member
 
Hao Chen
Join Date: Aug 2014
Posts: 66
Rep Power: 0
hchen is on a distinguished road
Hi Pablo:

Thanks a lot! I should check the wikki page first.

Best regards
Hao


Quote:
Originally Posted by Phicau View Post
Hi Hao,

regarding your first post, I think OpenFOAM is not correctly installed, there are some libraries that are not compiled, so dummy ones get called. Please, follow the instructions provided by OpenFOAM or found in this forum to install the version you have on your system.

Regarding the second post, this is a known issue, check this out:

http://openfoamwiki.net/index.php/Contrib/IHFOAM#Supported_Versions


The solution is easy: edit $WM_PROJECT_DIR/etc/controlDict and change commsType to nonBlocking

Best,

Pablo
hchen is offline   Reply With Quote

Old   October 20, 2014, 02:51
Default
  #64
New Member
 
Bo Terp Paulsen
Join Date: Oct 2010
Posts: 13
Rep Power: 15
botp is on a distinguished road
Quote:
Originally Posted by Phicau View Post
Hi all,

sorry for the (very) late replies, I have been performing lab experiments and I am currently preparing this week's IHFOAM course.

@Remi
This sounds to me like suffering from parasitic currents (large fake velocities at the interface), you should check if this is the case. There are a number of threads in the forum with palliative treatment for them.

@Bo
The mathematical derivations in del Jesus work are not strictly correct, regarding the classic rules of volume averaging. Thus, the formulas in that reference present some flaws, as noted in Jensen's paper, where the correct derivation is made.

Nevertheless, the numerical implementation of del Jesus et al. (2012) equations carried out either in IH3VOF or in IHFOAM corrects most of their deficiencies. In fact, there was only one practical difference with the implementation in Jensen et al. (2014), and that was that additional porosity ought to be introduced in some operators. Comparing both implementations, the results only vary where gradients of porosity appear, i.e. at the interfaces between the porous media. Not many people measure in that locations, as the flow there is very dependent on the local effects (the ones that we try to filter out by volume-averaging). This is the reason why the friction factors (a and b) are so different between the original reference (the third paper) and the current version of IHFOAM. The results are excellent in both cases, though.

The only differences in the implementation of the equations that I would anticipate are those of the closure terms, since we use different approaches.

Best,

Pablo
Pablo,

Thank you for clarifying this, it is appreciated.

Kind Regards,
Bo Terp
botp is offline   Reply With Quote

Old   October 22, 2014, 21:28
Default Stability backward
  #65
New Member
 
Remi Carmi
Join Date: Jul 2014
Posts: 15
Rep Power: 11
rcarmi is on a distinguished road
Hi All,

Is IHFOAM supposed to work with backward time integration?
If yes great!
if not any explanation?

I am getting a linear instability when I try.

Thanks
rcarmi is offline   Reply With Quote

Old   October 23, 2014, 02:53
Default
  #66
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Remi,

yes, and no. There are no mathematical restrictions for IHFOAM working with negative time steps. However, it is not possible to generate waves that propagate in a direction outwards of the domain (not in IHFOAM, not in any other models I know about). Read the irregular waves section in the manual, that is why the cosine function was implemented.

Without further information, my best guess is that this is the problem you are experiencing.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   October 23, 2014, 04:32
Default
  #67
New Member
 
Remi Carmi
Join Date: Jul 2014
Posts: 15
Rep Power: 11
rcarmi is on a distinguished road
Well I am still not using the wave generator. Just the solver for a standing wave.
So i start with a cosine deformation and a uniform 2D mesh and I set atmospher bc at the top and slip everywhere else (but empty at front and back of course).
I use linear, linear upwind for the div(phi,u).
And I change the refinement and the time step.
I am not able to make the backward to work (being stable and actually better than the Euler) but with ridiculously small time step (courant smaller than 0.1!).
...
Thanks
Remi
rcarmi is offline   Reply With Quote

Old   October 23, 2014, 05:27
Default
  #68
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Remi,

if no wave generation/absorption or porosity is involved you can run the same case with interFoam/interDyMFoam and the results (and limitations) will be the same.

Therefore, if you want to maximize the options of someone answering your questions, you should post them in a separate thread, as a number of people working with interFoam may not be following this particular thread.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   October 24, 2014, 11:09
Default Possible to use boundary conditions in interFoam?
  #69
New Member
 
Join Date: Jul 2014
Location: Aachen, Germany
Posts: 3
Rep Power: 11
Reni is on a distinguished road
Hello,
Thanks a lot for developping the IHFoam tool and also offering such a detailed and straightforward documentation!
Anyway, I got a question before starting to get too deep into the topic: Did I get it right that I can only use the IHFoam boundaries and solve with interFoam by solely linking the libs in the controlDict? Or doesn't this make any sense if I really want to adopt wave asorption at one of the boundaries?
Thanks a lot for your help!
Reni is offline   Reply With Quote

Old   October 27, 2014, 02:32
Default
  #70
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Reni,

yes, you are right. If you don't need the porous media flow capabilities, you can link the wave generation / absorption libraries inside controlDict and use the regular interFoam / interDyMFoam solvers. Take a look at the wiki for the instructions.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   October 27, 2014, 06:11
Default
  #71
New Member
 
Join Date: Jul 2014
Location: Aachen, Germany
Posts: 3
Rep Power: 11
Reni is on a distinguished road
Hi Pablo,
great. Thanks for the fast reply!
Best
Verena
Reni is offline   Reply With Quote

Old   November 3, 2014, 05:47
Default
  #72
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Greetings,

When i try to run the tutorial basewaveflume by running ./runCase i get these lines in termnial:

blockMesh meshing...
Preparing 0 folder...
Setting the fields...
Running...
#0 Foam::error:: printStack(Foam::Ostream&) in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam222/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 Elliptic::ellipticIntegralsKE(double, double*, double*) in "/home/antonio/OpenFOAM/antonio-2.2.2/platforms/linuxGccDPOpt/lib/libIHwaveGeneration.so"
#4 cnoidalFun::calculations(double, double, double, double*, double*) in "/home/antonio/OpenFOAM/antonio-2.2.2/platforms/linuxGccDPOpt/lib/libIHwaveGeneration.so"
#5 Foam::IH_Waves_InletAlphaFvPatchScalarField::updat eCoeffs() in "/home/antonio/OpenFOAM/antonio-2.2.2/platforms/linuxGccDPOpt/lib/libIHwaveGeneration.so"
#6 Foam::fvPatchField<double>::evaluate(Foam::UPstrea m::commsTypes) in "/home/antonio/OpenFOAM/antonio-2.2.2/platforms/linuxGccDPOpt/bin/ihFoam"
#7 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::evaluate() in "/home/antonio/OpenFOAM/antonio-2.2.2/platforms/linuxGccDPOpt/bin/ihFoam"
#8
in "/home/antonio/OpenFOAM/antonio-2.2.2/platforms/linuxGccDPOpt/bin/ihFoam"
#9 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#10
in "/home/antonio/OpenFOAM/antonio-2.2.2/platforms/linuxGccDPOpt/bin/ihFoam"
./runCase: line 16: 2861 Floating point exception(core dumped) ihFoam > ihFoam.log
Simulation complete.

And it only creates de folder "0", no other time step is created and i cannot see any results.

Anyone knows how to solve this? Maybe there is some mistake with the installation process?

Thanks,
António
Antoniorp is offline   Reply With Quote

Old   November 3, 2014, 09:21
Default
  #73
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi António,

apparently something is wrong with the elliptic functions. Can you submit your IHWavesDict file and water depth to check it myself? Have you made any other changes in the case?

It looks very similar to what happened here: http://www.cfd-online.com/Forums/ope...tml#post503610 , can I have full details of your installation (e.g. Linux distribution, architecture...)?

Best,

Pablo

Last edited by Phicau; November 3, 2014 at 10:52. Reason: Add reference to previous case
Phicau is offline   Reply With Quote

Old   November 4, 2014, 04:35
Default
  #74
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Thank you for the reply Pablo,

I'm using UBUNTU 12.04 and OpenFoam 2.2.2

I followed the installation instructions located at http://openfoamwiki.net/index.php/Contrib/IHFOAM

I didn't make the step 2.4 but i think it is not needed for this tutorial am i right?

Here are the files

https://www.dropbox.com/sh/1exty2zf5...2rj4h9fma?dl=0

Thanks,

António
Antoniorp is offline   Reply With Quote

Old   November 4, 2014, 10:35
Default
  #75
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi António,

64 bits system?

It is very strange, because I cannot reproduce this error. The case runs flawlessly in my two computers (Ubuntu 12.04, 64 bits, OpenFOAM 2.2.2-9240f8b967db).

Let's see if we can find this error, first reported by Dmitrjs. Can you test that the cnoidal and elliptical functions work on your machine?

Download:

https://www.dropbox.com/s/6aggsqfoc1...og.tar.gz?dl=0

and run:

Code:
./compile
./testProgram
The output should be what I obtain for this wave conditions:

Code:
Wave theory: cnoidal
H: 0.1
T: 3
h: 0.4
L: 6.0043
m parameter: 0.9771

Elliptic integrals
K: 3.28778
E: 1.03199
If this works then I cannot think why OpenFOAM is failing in your case... Did you change anything from the original case?

Best,

Pablo
Phicau is offline   Reply With Quote

Old   November 5, 2014, 05:21
Default
  #76
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Hello Pablo,

I have a 32-bit system

I don't think the functions are working, I ran the command ./compile and i got this lines:

antonio@antonio-P5QL-PRO:~/IHFOAM/IHFOAM_materials$ ./compile
waveFun.C: In function ‘int cnoidalFun::calculations(double, double, double, double*, double*)’:
waveFun.C:602:16: warning: unused variable ‘KElliptic’ [-Wunused-variable]
waveFun.C:603:16: warning: unused variable ‘EElliptic’ [-Wunused-variable]

And after this, when i run ./testProgram i dont get any response from terminal..
Antoniorp is offline   Reply With Quote

Old   November 6, 2014, 03:08
Default
  #77
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Dear António, dear all,

I think the problem was related to an infinite loop due to a hardcoded tolerance. The tolerance checks now the precision of the computer, so I hope to have fixed it.

António, please update the code from git, following the instructions of the wiki. Then re-compile it and try the case again. I kindly ask you to report back to check if this really works.

Best,

Pablo
Phicau is offline   Reply With Quote

Old   November 6, 2014, 05:57
Default
  #78
Member
 
António Pires
Join Date: Oct 2014
Posts: 33
Rep Power: 11
Antoniorp is on a distinguished road
Hi Pablo,

I updated the code and everything is working perfectly now! I've only done the first tutorial but it went with no problem at all, time steps we're created as they should be.

Thank you very much once again!

António
Antoniorp is offline   Reply With Quote

Old   November 8, 2014, 23:21
Default Extracting surface elevation or water depth at horizontal locations
  #79
Senior Member
 
Join Date: Jul 2011
Posts: 120
Rep Power: 14
haze_1986 is on a distinguished road
Hi All, I am curious and would like to contribute some of my findings after several months of using IHFoam. Correct me if I'm wrong but as of now, there is no way of extracting the time series of the water depths of surface elevations at several positions of the domain built in to IHFoam?

I am currently using this in my controlDict file to extract the surface @ runtime:

Code:
functions
(
   freeSurface
   {   
       type            surfaces;
       functionObjectLibs
       (   
           "libsampling.so" 
       );  
       outputControl   timeStep;
       outputInterval  10;  
       surfaceFormat  vtk;
       fields
       (   
           alpha1
       );  
       surfaces
       (   
           freeSurface
           {   
               type        isoSurfaceCell;
               isoField    alpha.water;
               isoValue    0.5;
               interpolate false;
               regularise  false;
           }   
       );  
       interpolationScheme cell;
   }  
);
One of the issues I've encountered in validations is that an isoValue of 0.5 may not be the ideal case when comparing with experiments or depth-averaged models. I may have to tune this value to 0.9 or 0.7 at times for different cases. I'm not sure if this is due to having a relatively coarse mesh or whether it will converge to a value if I were to do refinements.

Another issue is that since this is done at runtime, I have to run this again if I were to tune the isovalue. Does anyone know of a more elegant way of doing this as a post processing step instead?
mo_na likes this.
haze_1986 is offline   Reply With Quote

Old   November 9, 2014, 04:48
Default
  #80
Senior Member
 
Pablo Higuera
Join Date: Jan 2011
Location: Auckland
Posts: 627
Rep Power: 19
Phicau is on a distinguished road
Hi Haze,

thanks for your code that extracts free surface as a 3D surface along the whole domain. It has been around other threads, but it can be handy for users, as sometimes things are difficult to look for when you don't know that they exist.

There is a way to run this function object after the case has finished, to work like the sample tool. You just need to run execFlowFunctionObjects.

You are right, alpha = 0.5 is just an arbitrary convention, but that cell is really half air and half water, so there is plenty of water above it yet. In our papers we found out that to estimate run-up it is reasonable to consider alpha = 0.9. Moreover, there are lots of ways to obtain free surface elevation, we cover 4 or 5 in the training courses.

Did you already register in http://ihfoam.ihcantabria.com/source-download/ ? We do provide tools to obtain free surface elevation at any location in the free materials that you can download when you register. Check the breakwater case. There you can find a procedure to sample the pressure and free surface elevation, and some python tools to convert the raw data into a time series. You also have a python tool to plot it.

Best,

Pablo
mo_na likes this.
Phicau 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
Divergence detected in AMG solver: k when udf loaded google9002 Fluent UDF and Scheme Programming 3 November 7, 2019 23:34
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 04:17
UDF velocity profile willroca Fluent UDF and Scheme Programming 2 January 10, 2016 03:13
Error messages atg enGrid 7 August 30, 2013 11:16
Phase locked average in run time panara OpenFOAM 2 February 20, 2008 14:37


All times are GMT -4. The time now is 08:11.