I don't think so. I tried to a
I don't think so. I tried to adapt the test example conditions for the mesh I wanted to use. I assumed that the waves would be generated at the face I assigned as the inlet.
|
Well, they should be. Otherwis
Well, they should be. Otherwise there is a bug I have not tested for.
/ Niels |
Niels,
looks like you have so
Niels,
looks like you have some really nice BC's and to install them i followed the instructions above. i did try to compile interFoam adding to the "files" (last two lines): EXE_LIBS = \ -linterfaceProperties \ -lincompressibleTransportModels \ -lfiniteVolume \ -libsurfaceWavePressureFvPatchScalarField.so \ -libsurfaceWaveVelocityFvPatchScalarField.so also tried: -$(FOAM_USER_LIBBIN)libsurfaceWavePressureFvPatchSc alarField.so and so. but it does, in the first case, find: /usr/bin/ld: cannot find -libsurfaceWavePressureFvPatchScalarField.so in the second case: g++: unrecognized option '-/home/erik/OpenFOAM/erik-1.5/lib/linuxGccDPOpt/libsurfaceWaveVelocityFvPatchSc alarField' what can be wrong? i used the Allmake you made for the catalog i placed in my catalog as you see in the path above. would be grateful for help! thank you Erik |
Hi
Under the options EXE_LI
Hi
Under the options EXE_LIBS add it in the following form: -lsurfaceWavePressureFvPatchScalarField \ -lsurfaceWaveVelocityFvPatchVectorField Enjoy your weekend, Niels |
Niels - Brilliant!
Thank you!
Niels - Brilliant!
Thank you! Looking forward to trying this out with my boat in there! Erik |
Hi Niels,
I am looking at y
Hi Niels,
I am looking at your BC implementation and I'd like to use it combined with a non-zero inflow mean velocity (to simulate a boat advancing in a wavy sea). How would you set your 0/U properties for your BC in that case ? Thanks a lot. Nicola |
hi!
Niels, i have tried to fi
hi!
Niels, i have tried to figure out what the sampleSurfaceDict and sampleDict is used for, could you lease explain? also i run into an error (only when i run first order, but for second order nothing happens but no error either) it says: MULES: Solving for gamma Liquid phase volume fraction = 0.4498884 Min(gamma) = 0 Max(gamma) = 1 MULES: Solving for gamma Liquid phase volume fraction = 0.4498895 Min(gamma) = -8.762161e-22 Max(gamma) = 1 This routine has not yet been implemented ...and so on. what can i do you think, it seems to come from evaluateFace.H!? it is when i use snappyhexmesh to make a box (six walls) hanging inside another bigger box and then run it with this setup. could it be the size of the mesh, it is quite big cells? any help would be appreciated! thank you Erik |
Hi
Sorry for the late resp
Hi
Sorry for the late response, but I am currently out-of-sync with the forum and will continue to be so for some time. @Nicola I would locate an appropriate theory for wave and currents and implement it. I would suggest to start looking for a potential theory solution, even though one could question the validity of the vertical velocity profile. @Erik The reason for "This routine has not yet been implemented" is, that the "horizontal" edges in your boundary faces are not truly horizontal. It is a missing piece, which I know needs to be implemented, but have not had the time and/or need to do it. sample*Dict are for postprocessing purposes only and will properly not work for 1.5, as the sample utility has been reimplemented by combined both sample and sampleSurfaces into one. Hope it clears the uncertainties. Have a nice weekend, Niels |
Hi Nicola
To be a little bi
Hi Nicola
To be a little bit more specific, you need to find a theory which takes the current into consideration when determining the dispersion relation, as the current will come in as a first order contribution, and it will result in multiple solutions to the dispersion relations, where one or the other will come into play when/if wave blocking occur, e.g. change of propagation direction and wave number with waves over a bar with an opposing current. Unfortunately I cannot think of any references, but hopefully the above have given you come clues. Best regards, Niels |
Hi Niels,
thanks for sharin
Hi Niels,
thanks for sharing your wave bc! I looked at your testEx and it worked out perfectly (in parallel on four cpus). I am thinking of using it for my case, but I have triangular faces on the boundary patch (and I need to generate a solitary wave but that's another problem). As I'm new to OpenFoam and C++ - has someone already looked at the "minor part of the method, which hasn't been implemented yet" in order to use arbitrary polygons or are there by any chance updates of your bc? Thank for any helpful comments in advance. Franziska |
Hi Franziska
Well, first of
Hi Franziska
Well, first of all, I need to admit that you do not need to have extensive knowledge in C++ to extend the code to cover arbitrary polygons, as my own experience back then was limited and it is therefor written in a C-flavor style. Further, I can promise you that I will not have time to consider it at least before February;) To explain it in short terms, the part which has not been implemented looks at polygons, which has only one node which intersects the water surface, the rest are either wet or dry. This is not possible to occur if you have horizontally aligned hex-faces as there will either be two or zero intersecting nodes. The implementation of a solitary wave should be rather straight forward. Good luck, Niels |
Hello All,
Great work. Also
Hello All,
Great work. Also for me very useful. Some questions and comments: 1. Regarding speed: many of us want to simulate some object in the middle of the domain moving at some speed. This speed is usually supplied at the inlet BC. If I am right Niels tells that he does not know any theory about how to implement this speed. However, isn't this just a matter of adding a fixedValue for Ux on top of the calculated values? You do not change the waves with that, you only make the entire reference frame moving. Or am I wrong? 2. Without having studied the subject very much I had the idea to implement waves by simply supplying a gamma field for every time step at the inlet. Apparantly this thought is too simple but can anyone explain me why this is not correct? 3. Implementation in interFoam: in the user manual, 3.2.6, an explanation is given about how to implement a user created library without having to recompile all individual applications. Has anyone tried this? And secondly: the manual speaks about a src/foamUser directory which is meant for this purpose. However, in my OF-1.5 there is no such directory. Any ideas here? Brgds, Mark |
Hi Mark
Thanks for the posi
Hi Mark
Thanks for the positive responsehttp://www.cfd-online.com/OpenFOAM_D...part/happy.gif ad 1.: Since my last post I have discussed this with one of my supervisors. In stream-function theory by Fenton (cannot recall the year, but it is in the last of the 1980'ies), you can specify a certain flux integrated over the vertical, which is identical to a mean current. The reason that you cannot add a current directly on top of the solution is, that the current effects the dispersion relation as a first order term! So you could solve the stream function theory coefficients and apply those on your boundary and then you will have some sort of current. This current will most definitely not be the one you see in nature, as the profile originates from potential theory and thus do not include turbulence, which is indeed present - though it is a good first approximation to get things started. ad 2.: I do not have a thourough answer, but only applying the gamma field (and I suppose zeroGradient for U and pd?), it would be the same as having a free surface channel flow with no body-force and only zeroGradient on all terms, which will not drive the wanted flow, as you do not apply neither momentum nor acceleration at the boundary. ad 3.: I have not looked into it as it has been less prioritated than anything else, thus I cannot help you with that. Best regards, Niels |
Hi Niels,
it is also possib
Hi Niels,
it is also possible to use your libs for OF 1.5? I tried it but I always got this error also: /usr/bin/ld: cannot find -libsurfaceWavePressureFvPatchScalarField.so this happen if I try to recompile interFoam. I adjusted the "option" file like as per description. Maybe somebody was successfull in OF 1.5 and can give me some advice. Thanks a lot Bye Thomas |
Hi Mark,
I am also trying t
Hi Mark,
I am also trying to add Niels's new Wave BC to interFoam using OF 1.5 on Ubuntu 8.10. Now I have recompiled interFOAM already. I am about to run it... I think you should meet a problem because I've got them during my doing. Regarding "foamUser", Yes, your are right, there is no such folder in OF 1.5. Therefore, my treatment is to recompile interFOAM. You may meet the problem when you wmake those new BC libs, there are no such files cpuTime.H and cpuTime.C. Then again my treatment is to search them through OpenFOAM document and copy them into ..\OpenFOAM-1.5\src\finiteVolume\InInclude\. After that you can try to recompile interFOAM following Niels's suggestion. -------------------------------------------------------------- Hi Niels, Thanks a lot for your new Wave BC. I am trying to run it then apply it into a real case. I have successfully recompiled interFOAM. But there is an error when I run it: Create time Create mesh for time = 0 Reading environmentalProperties Reading field pd keyword waveType is undefined in dictionary "/home/user/OpenFOAM/OpenFOAM-1.5/sxh-1.5/run/VOF_BC/testExample/constant/enviro nmentalProperties" file: /home/user/OpenFOAM/OpenFOAM-1.5/sxh-1.5/run/VOF_BC/testExample/constant/environ mentalProperties from line 25 to line 30. From function dictionary::lookupEntry(const word& keyword) const in file db/dictionary/dictionary.C at line 213. FOAM exiting May I get your advice about this, Thanks in advance. Regards Xiaohui |
Hello All,
I managed to bui
Hello All,
I managed to build the BC in OF1.5, I do not have access to that specific computer right now, there was indeed something with a name change or so but anyway it worked very easy. But still my question: is it possible to build the BC as a user_lib so that it is accessible for all solvers? Well, as time allows I will just try it. Last thing Xiaohui: your error message says exactly what is going wrong: as Niels you have to define waveType in the dictionary. Brgds, Mark |
Dear Niels,
Your new BC is
Dear Niels,
Your new BC is working by adding waveType into EnvironmentalProperties file. The test case is running now. I run the case by serial not Parallel, so a bit of slowly. I am thinking of adding uniform flux BC in inlet based on your code. Do you think it is feasible? Regards Xiaohui |
-----------------
I am thinki
-----------------
I am thinking of adding uniform flux BC in inlet based on your code. Do you think it is feasible? ----------------- If you want to add a uniform flux inlet, then wouldn't it be significantly more easy to used fixedValue on the velocity field? Otherwise you need to elaborate on the question. Best regards, Niels |
Hi Niels,
sorry for asking
Hi Niels,
sorry for asking again, you said earlier you were setting the velocity in the air to zero in each time step in your bc. I'm probably at a complete loss, but how did you achieved that. Thanks in advance, Franziska |
Hi Niels,
sorry for asking
Hi Niels,
sorry for asking again, you said earlier you were setting the velocity in the air to zero in each time step in your bc. I'm probably at a complete loss, but how did you achieved that. Thanks in advance, Franziska |
All times are GMT -4. The time now is 12:52. |