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

[waves2Foam] working on adding waves2Foam toolbox to compressibleInterFoam instead of interFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2014, 01:22
Default 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: 11
betsybrite is on a distinguished road
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
betsybrite is offline   Reply With Quote

Old   July 19, 2014, 05:01
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
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
}
I have suggested it like that, since it retains the gauge pressure definition in waveTheories and it is backward compatible for all, who uses the incompressible interFoam.

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 09:57. Reason: removed answer to another post that was on the main thread
ngj is offline   Reply With Quote

Old   July 21, 2014, 18:20
Default
  #3
New Member
 
Betsy
Join Date: Jul 2014
Location: Honolulu, HI
Posts: 5
Rep Power: 11
betsybrite is on a distinguished road
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
betsybrite is offline   Reply With Quote

Old   October 22, 2014, 21:05
Default
  #4
New Member
 
Betsy
Join Date: Jul 2014
Location: Honolulu, HI
Posts: 5
Rep Power: 11
betsybrite is on a distinguished road
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
betsybrite is offline   Reply With Quote

Old   October 23, 2014, 01:13
Default
  #5
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37
ngj will become famous soon enoughngj will become famous soon enough
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.
ngj 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
Adding diffusion term to interFoam transport equation Gearb0x OpenFOAM Programming & Development 3 February 14, 2023 04:16
Adding Temperature variations to Density in interFoam spitchers OpenFOAM Running, Solving & CFD 7 June 15, 2017 10:55
chtMultiRegionSimpleFoam: crash on parallel run student666 OpenFOAM Running, Solving & CFD 3 April 20, 2017 11: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 12:58
conjugateHeatFoam + interFoam farhagim OpenFOAM Programming & Development 15 July 19, 2016 07:55


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