|
[Sponsors] |
[waves2Foam] working on adding waves2Foam toolbox to compressibleInterFoam instead of interFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 17, 2014, 02:22 |
working on adding waves2Foam toolbox to compressibleInterFoam instead of interFoam
|
#1 |
New Member
Betsy
Join Date: Jul 2014
Location: Honolulu, HI
Posts: 5
Rep Power: 12 |
Hi Niels,
First of all, I want to echo many others in this post by saying that I am so grateful for your waves2Foam toolbox and your attention to this thread! I am working on adding the waves2Foam toolbox for use with compressibleInterFoam instead of interFoam. I have been able to generate waves with the same amplitude as in interFoam. The problem I am running into is that in order to use the compressibility factor psi in compressibleInterFoam I need to be solving for absolute pressure instead of gauge pressure. It appears in the compressible tutorials, this is accomplished by setting: defaultFieldValues ( volScalarFieldValue alpha1 1 volScalarFieldValue p_rgh 1e5 ); in setFieldsDict. Is there a different way to do this through waves2Foam since we don't use setFieldsDict? Thank you so much! Betsy |
|
July 19, 2014, 06:01 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Good morning
@Betsy: I am not quite sure, what you are asking, since you talk about total pressure, but the example you gave sets the gauge pressure (p_rgh). Nonetheless, the free surface and velocities are independent on whether you specify total or gauge pressure as primitive variable. Therefore, it is merely a matter of making a pre-processing tool, which sets the total pressure as well. Try to look in the existing setWaveFields, because it does set the pressure (for a limited number of cases), but it is only the gauge pressure. It should be straight forward for you to add the hydrostatic component in setWaveFields directly. Something like the following: Code:
Switch addHydrostatic = someDictName.lookupOrDefault<Switch>("addHydrostatic", "false"); if (addHydrostatic) { // Perform the pressure correction } Furthermore, I have seen your recent articles in Coastal Engineering. Do you think that there would be an opportunity for you to share the solitary wave description, which you used? 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. Last edited by wyldckat; October 8, 2018 at 10:57. Reason: removed answer to another post that was on the main thread |
|
July 21, 2014, 19:20 |
|
#3 |
New Member
Betsy
Join Date: Jul 2014
Location: Honolulu, HI
Posts: 5
Rep Power: 12 |
Hi Niels,
Thank you for your reply, I will look into this. As far as the description of the solitary wave used in the coastal engineering paper, I would like to refer you to my co-author Masoud Hayatdavoodi (masoud@hawaii.edu). If I can get waves2Foam working with compressible air, I will be happy to share this with you as well. Thanks again! Betsy |
|
October 22, 2014, 22:05 |
|
#4 |
New Member
Betsy
Join Date: Jul 2014
Location: Honolulu, HI
Posts: 5
Rep Power: 12 |
Hi Niels & followers of this thread -
I wanted to share that I have been able to successfully implement the waves2Foam package with the compressible solver, compressibleInterFoam. I modified the source code in the same manner as instructed for the incompressible solver, interFoam. As I mentioned above, interFoam solves for gauge pressure while compressibleInterFoam solves for absolute pressure. Therefore in order to run waves2Foam using the compressible solver, the pressure must be initially set to atmospheric pressure. I just do this manually in the p_rgh file (re-saving after performing setWaveField as this will re-set it to 0) but someone else may find a more elegant way to do this. Results from this will be in my PhD dissertation, which should finalized by December. Regards, Betsy |
|
October 23, 2014, 02:13 |
|
#5 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Betsy,
Thank you for the update and congratulations. Could you please inform us, when there is a thesis available for download? 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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Adding diffusion term to interFoam transport equation | Gearb0x | OpenFOAM Programming & Development | 3 | February 14, 2023 05:16 |
Adding Temperature variations to Density in interFoam | spitchers | OpenFOAM Running, Solving & CFD | 7 | June 15, 2017 11:55 |
chtMultiRegionSimpleFoam: crash on parallel run | student666 | OpenFOAM Running, Solving & CFD | 3 | April 20, 2017 12:05 |
[waves2Foam] How to set speed at Inlet in waves2Foam, like we set in interfoam, U dictionary | Nemo_CFDEngineer | OpenFOAM Community Contributions | 5 | January 15, 2017 13:58 |
conjugateHeatFoam + interFoam | farhagim | OpenFOAM Programming & Development | 15 | July 19, 2016 08:55 |