|
[Sponsors] |
[waves2Foam] sampling the velocity field and other related issues |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 27, 2015, 18:03 |
sampling the velocity field and other related issues
|
#1 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi everbody,
i am strugling to get the velocity field in a cetain position of the wave flume. I am doing it as post processing, so i run the case and get the horizontal velocity in all cells with foamCalc and then i use the sample utility but i need to multiply them with alpha1 to get the velocity of the water and that is what i am not able to do. so maybe somebody can give me a advise. Is there a utility to do it ? My final goal is to get the overtopping for a wavebreaker and i allready looked ate the overtopping utility but i am a noob and i dont know how to used it. maybe if somebody allready used the overtopping utility can give a help with it too. thanks and Greets Rafa |
|
July 28, 2015, 16:03 |
|
#2 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi everbody,
1)I solved my problem writing a script on octave/matlab,i was not so hard but now i dont know If the method to multiply aplha1 with the Ux component is the right way. My question is, if it is the real velocity of the water at the free surface that i get or I is it a mixture with water and air? is there a better way? 2)I want to know if i need to garantee that the alpha is equal or above 0.5 to be sure that i obtain only the water velocity? greets to everybody RM |
|
July 28, 2015, 22:54 |
|
#3 |
New Member
Pablo Montalvo
Join Date: Feb 2015
Location: Taiwan
Posts: 9
Rep Power: 11 |
Hello,
@Rafael You extracted the alpha field as it is using matlab? How? Anyway, I think you may have some inconsistencies. The particle velocity at the crest will behave in a strange way if you just multiply it by the relative fraction. If your goal is to extract the velocity field under the wave, then your next step (given that you already have the field and the alpha values) would be indeed to put a threshold at alpha=0.5. I would recommend that below that hand-drawn free surface, you take the velocity field as it is, and above you put it to zero. It is more conservative, but I think it will work. Last edited by wyldckat; August 25, 2018 at 14:07. Reason: removed answers to other posts that were on the main thread |
|
July 29, 2015, 03:15 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Good morning Rafael,
You should really use the overtopping utility, because the process of overtopping is so rapid that the outputting frequency of the full fields would kill you in terms of stored data. Also, the velocities in the cell centres are not necessarily mass conserving, since they are a reconstruction based on the face velocities; the face fluxes are, however, mass conserving. These face fluxes are used to calculate the flux of water over a pre-defined plane in the overtopping utility. 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. |
|
July 29, 2015, 06:12 |
|
#5 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi Niels and Olbap,
thanks for your quick answers! @olbap: I use the waveprobesNgauges to create a vertical line of gauges, the I use the sets for the sampleDict, then i run sample and extract the data with matlab out of the postprocessing folder, sorry for the bad explanation in the first thread. My problem is that i i am not really familiar with python or C so i dicided to write a script in matlab, only to save time. @niels: My ideia was to capcture the velocity of the alpha 1 that are overtopping then intergrate the hole velocity profile, is that a bad iea? i try to use the overtopping utility, at the moment i didn try it and i really not sure how to use it, than i will compre both results. Is there a tutorial with the overtopping utility maybe, i really appreciate if you or somebody are able to helping me to use the overtopping utility? Greets and thanks again Rafael Marques |
|
July 29, 2015, 07:14 |
|
#6 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 29, 2015, 07:19 |
|
#7 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi Niels,
a big thanks a lot for the fast reply, i will use it. You are a real big help with my thesis! Greets Rafa |
|
July 29, 2015, 13:41 |
overtopping
|
#8 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi Niels,
I tried to use the overtoppping utility but i failed, i get this error messagem of missig libary. --> FOAM Warning : From function dlOpen(const fileName&, const bool) in file POSIX.C at line 1179 dlopen error : libporosityModule.so: cannot open shared object file: No such file or directory --> FOAM Warning : From function dlLibraryTable:pen(const fileName&, const bool) in file db/dynamicLibrary/dlLibraryTable/dlLibraryTable.C at line 99 could not load "libporosityModule.so" --> FOAM Warning : From function dlLibraryTable:pen(const dictionary&, const word&, const TablePtr&) in file lnInclude/dlLibraryTableTemplates.C at line 67 Could not open library "libporosityModule.so" Unknown function type overtopping Valid functions are : 4 ( patchProbes probes sets surfaces ) From function functionObject::New(const word& name, const Time&, const dictionary&) in file db/functionObjects/functionObject/functionObject.C at line 92. I tried to fix it and recompiled it and i saw that there are no libporositymodule.so only this libaries, '/home/mfc/OpenFOAM/mfc-2.2.2/platforms/linux64GccDPOpt/lib/libwaves2Foam.so' is up to date. '/home/mfc/OpenFOAM/mfc-2.2.2/platforms/linux64GccDPOpt/lib/libwaves2FoamProcessing.so' is up to date. '/home/mfc/OpenFOAM/mfc-2.2.2/platforms/linux64GccDPOpt/lib/libwaves2FoamSampling.so' is up to date. '/home/mfc/OpenFOAM/mfc-2.2.2/platforms/linux64GccDPOpt/lib/libwaves2FoamPorosity.so' is up to date. maybe i need to update but i dont know how? but maybe you can give me a hand to get this rolling... thanks again and Greets RM |
|
July 29, 2015, 15:00 |
|
#9 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Good evening,
I just checked the source code and both porousWaveFoam and waveFoam in OF222 links to the sampling library in waves2Foam, so I expect that you are not using any of these solvers? Furthermore, libporosityModule.so is not any of my creation, so please detail what you are trying to accomplish and especially how. 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. |
|
July 29, 2015, 15:39 |
|
#10 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi Mr.Niels,
I am using porousWaveFoam and ihFoam for a wavebreaker, but i only made copy/paste from this thread: http://www.cfd-online.com/Forums/ope...tml#post547550 and there are the library. then i made the topoSet to define the zone and them tried to run but i got this error message At the moment i was using ihFoam with your utility because i use both of toolboxes to compare them. And till now i was able to use all your utility in ihFoam. My goal is to use the overtopping utility in Ihfoam and in waves2foam, with ihfoam solver and the porousWaveFoam solver. Normallly i use the waves2foam utilities in ihfoam as "pre or postprocessing" ( before or after solving) but the overtopping utility are used during the calculation. greets and thanks for all Rafa |
|
July 29, 2015, 15:51 |
|
#11 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hallo,
I apologise, but ihFoam is outside my area of expertise, so I will not be able to help you in merging the functionalities. 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. |
|
July 29, 2015, 16:46 |
|
#12 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi Niels,
I understant that and i apreciate all the help that you gave me,with out your advises and from the cfd online community i get really stuck. I am using now the overtopping utility in waves2foam ,I don't know whats the library for the overtopping i need to include the functionObjectLibs? Greets and thanks again Rafael Marques Last edited by rafa13; July 29, 2015 at 19:41. |
|
July 30, 2015, 06:43 |
|
#13 |
Member
Rafael Marques
Join Date: Mar 2014
Location: Almada/Mülheim a.d. Ruhr, Portugal/Germany
Posts: 67
Rep Power: 12 |
Hi Niels and foamers,
I found the library, "libwaves2FoamSampling.so", sorry about that i am a new at open foam and on programming at all. So its difficult to me. here is the function in my controldict: functions { overtopping0 { type overtopping; functionObjectLibs ( "libwaves2FoamSampling.so" ); outputControl outputTime; // Alternative: timeStep outputInterval 1; } } I am running now the in waves2foam the overtopping utility with out problems. greets and thanks a lot Rafa Marques |
|
|
|