|
[Sponsors] |
[waves2Foam] Trying to modify the 3DWaves tutorial to apply to 3D waves incident on a cylinder |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 9, 2015, 06:07 |
Trying to modify the 3DWaves tutorial to apply to 3D waves incident on a cylinder
|
#1 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Hi Niels,
I'm trying to modify the 3DWaves tutorial to apply to 3D waves incident on a cylinder using Openfoam version 2.3.0 running on Ubuntu 12.04. I am using almost the same boundary conditions and also tried to apply the relaxation factor. When I run waveFoam though, I get the following output: PIMPLE: Operating solver in PISO mode Reading g Reading waveProperties Reading waveProperties Reading field p_rgh Reading field U Reading/calculating face flux field phi Reading transportProperties Selecting incompressible transport model Newtonian Selecting incompressible transport model Newtonian Selecting turbulence model type laminar Calculating field g.h No finite volume options present #0 Foam::error:rintStack(Foam::Ostream&) in "/home/ariel/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/home/ariel/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::relaxationShapes::relaxationShapeRectangular ::relaxationShapeRectangular(Foam::word const&, Foam::fvMesh const&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so" #4 Foam::relaxationShapes::relaxationShape::adddictio naryConstructorToTable<Foam::relaxationShapes::rel axationShapeRectangular>::New(Foam::word const&, Foam::fvMesh const&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so" #5 Foam::relaxationShapes::relaxationShape::New(Foam: :word const&, Foam::fvMesh const&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so" #6 Foam::relaxationSchemes::relaxationScheme::relaxat ionScheme(Foam::word const&, Foam::fvMesh const&, Foam::Field<Foam::Vector<double> >&, Foam::Field<double>&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so" #7 Foam::relaxationSchemes::relaxationSchemeSpatial:: relaxationSchemeSpatial(Foam::word const&, Foam::fvMesh const&, Foam::Field<Foam::Vector<double> >&, Foam::Field<double>&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so" #8 Foam::relaxationSchemes::relaxationScheme::adddict ionaryConstructorToTable<Foam::relaxationSchemes:: relaxationSchemeSpatial>::New(Foam::word const&, Foam::fvMesh const&, Foam::Field<Foam::Vector<double> >&, Foam::Field<double>&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so" #9 Foam::relaxationSchemes::relaxationScheme::New(Foa m::word const&, Foam::fvMesh const&, Foam::Field<Foam::Vector<double> >&, Foam::Field<double>&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so" #10 Foam::relaxationZone::relaxationZone(Foam::fvMesh const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2Foam.so" #11 in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/bin/waveFoam" #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/bin/waveFoam" Floating point exception And then it doesn't run from here. I don't understand where the problem would be located or what it applies to. I can send on any other information I'm able, let me know what else I can tell you. Thanks in advance for any advice Ariel |
|
October 9, 2015, 10:57 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hallo,
I am almost sure that the problem relates to your relaxation zones, so try to use relaxationZoneLayout to see, what goes wrong. 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. |
|
October 12, 2015, 08:11 |
|
#3 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Hi Niels,
Thanks for getting back to me. Can you give me any advice on how to use the relaxationZoneLayout? Thanks again Ariel EDIT: Sorry realised this was an extremely stupid question right after asking it! I've managed to get it working, I changed the size of the relaxation zone. SECONDARY QUESTION: I have a simulation running but water is only entering from the bottom half of the field (I have a 3D field from -8 < x < 20, -2 < y < 2, -5 < z < 0.5) and the water is only entering for negative y values. I can tell this is happening because if I look at parafoam before running the case, the set up looks correct from one side but from the other there are no waves entering .. Also, when I tried to run the case and then view some results in paraview, paraview shuts down with the error: Code:
size 31000 is not equal to the give value of 62000 Am i looking in the wrong place or can you point me to the file that might help me change my inlet field so that the water enters from -2 < y < 2? Thanks in advance! Last edited by arieljeds; October 12, 2015 at 10:52. |
|
November 11, 2015, 08:06 |
|
#4 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Hi Niels,
Apologies for not correcting an earlier badly worded question.. I re-read it there and it doesn't make sense!! Sorry about that.. I managed to view the relaxation zone and it looks ok for the moment. I'm trying to model the free surface flow past/around a surface piercing cylinder. I am currently using relaxation zones. I'm having an issue when I run setWaveParameters after running blockMesh, only half the field (-y only) is being set for alpha.water and p_rgh (see image attached). I had a look through the source code for the setWaveField and setWaveParameters and I'm not seeing where I can adjust this. My alpha.water file looks like (without foam header): Code:
dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { top { type symmetryPlane; } bottom { type symmetryPlane; } inlet { type waveAlpha; refValue uniform 0; refGrad uniform 0; valueFraction uniform 1; value uniform 0; } outlet { type zeroGradient; } cylinder { type zeroGradient; } seaFloor { type zeroGradient; } atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } } Code:
seaLevel 0.01; seaLevelAsReference false; // A list of the relaxation zones in the simulation. The parameters are given // in a <name>Coeffs below. relaxationNames (inlet outlet); initializationName outlet; inletCoeffs { waveType stokesFirst; // Regular waves depth 5.000; // Water Depth period 6.0; // Wave period phi 0.00000; // Phase direction (1.0 0.0 0.0); // Direction of incoming waves height 0.2; // Wave height in meters relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType INLET; startX (-8.0 -2.0 -5); endX (-4.0 2.0 0.5); orientation (1.0 0.0 0.0); } }; outletCoeffs { waveType potentialCurrent; U (0 0 0); Tsoft 2; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType OUTLET; startX (15 -2 -5); endX (20 2.0 0.5 ); orientation (1.0 0.0 0.0); } }; Hopefully this question makes sense.. Please let me know if there's other info I can give you. |
|
November 11, 2015, 08:18 |
|
#5 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi Ariel,
Could it be that your gravity vector is still pointing in the y-direction? 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. |
|
November 11, 2015, 08:24 |
|
#6 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Yes that was exactly it! I didn't even think about that.. Thank you for your quick and helpful reply..
|
|
November 19, 2015, 13:37 |
|
#7 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Hi Niels,
I'm trying to construct a case of linear wave flow around a surface piercing cylinder using relaxation zones at the inlet and outlet. I am very new to CFD and OpenFOAM still so I'm trying to understand the boundary conditions to use with waves2Foam. I managed to set up the case and run it but it is not looking right yet so I have a couple of initial questions.. 1) First of all, I am going to be interested in the near-wake only but at the moment, my domain is 2 wavelengths long (38 m). The inlet relaxation zone is 4m long and the outlet is 10m. Is it unnecessary for me to use relaxation zones in this case due to the focus on the near wake? 2) After running waveFoam, the simulation doesn't look right and when I did a vector plot in paraview, the vectors are pointing in the positive z direction instead of the expected x direction. I can't see where this has gone wrong... My 0/U file is: Code:
dimensions [0 1 -1 0 0 0 0]; internalField uniform (1 0 0); boundaryField { top { type symmetryPlane; } bottom { type symmetryPlane; } inlet { type waveVelocity; refValue uniform (0 0 0); refGradient uniform (0 0 0); valueFraction uniform 1; value uniform (0 0 0); } outlet { type fixedValue; value uniform (1 0 0); } cylinder { type fixedValue; value uniform (0 0 0); } seaFloor { type slip; } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } } Code:
seaLevel 0.00; seaLevelAsReference false; // A list of the relaxation zones in the simulation. The parameters are given // in a <name>Coeffs below. relaxationNames (inlet outlet); initializationName outlet; inletCoeffs { waveType stokesFirst; // Regular waves depth 5.000; // Water Depth period 3.58; // Wave period phi 0.00000; // Phase direction (1.0 0.0 0.0); // Direction of incoming waves height 0.084; // Wave height in meters relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType INLET; startX (-8.0 -2.0 -5); endX (-4.0 2.0 0.5); orientation (1.0 0.0 0.0); } }; outletCoeffs { waveType potentialCurrent; U (0 0 0); Tsoft 3.58; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType OUTLET; startX (28 -2 -5); endX (38 2.0 0.5 ); orientation (1.0 0.0 0.0); } }; I hope that my questions make sense! Thanks, Ariel |
|
December 2, 2015, 13:10 |
|
#8 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Hi,
I have been running some cases using Stokes 1st waves in waves2foam based off of the waveFlume case and the 3DWave cases. I am trying to do two things: 1) Simulate regular waves in a wave tank (would like to attempt irregular and possibly 3D ocean waves too but have not attempted this yet) 2) simulate regular wave flow around a cylinder with viscosity but no turbulence I have set up a case to for the wave tank and run it. First of all, it appears that the relaxation zone is very long because there only seem to be a couple of wavelengths. My domain goes from -5 < x < 150, -10 < y < 10, -5 < z < 2 (z is the vertical direction). The wavelength is L = 30 m (T = 5sec) and the relaxation zone lengths for the inlet and outlet are 1.5*L. Wave height is 0.3 m. Because it looks as though there are only a couple of wavelengths so I was wondering if the outlet relaxation zone is too long? Also, if I run a vector plot (using glyphs), it appears that there is a lot of reflection. I have been trying to read and understand what is affecting this but am getting stuck. Would really appreciate any help. Secondly, I used the probeDefinitions to create some data for the free surface but I'm not sure how to plot this data? Thanks for any help! Please let me know if I can provide you with specific files or anything. |
|
December 7, 2015, 10:33 |
|
#9 | |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Quote:
|
||
December 7, 2015, 10:40 |
|
#10 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hallo Ariel,
It does not make sense that you say that there is a lot of reflection, but on the other hand the wave does not travel through the entire domain. Your initial question was very hard to understand, which was the reason that I did not answer. See a guide here to pose "easy to answer" questions: http://www.cfd-online.com/Forums/ope...-get-help.html 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. |
|
December 7, 2015, 10:52 |
|
#11 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Hi Niels,
Thank you for your quick reply and I apologise for another poorly worded question. I'm extremely new to Openfoam/CFD/programming and sometimes I'm finding it hard to ask a specific question clearly if I'm struggling to understand the relevant area. I hope that this is more specific: I have set up a wave tank and I would like to begin by simply generating a wave using the relaxation zones and stokes first waves. I have set up the wave tank but when I run the simulation, the wave only appears to reach approximately 1.5 wavelengths (the length of the inlet relaxation zone) and then dissipate, rather than travel down to the outlet. The relaxation zone layout, velocity contour plot at the final time step and my waveProperties.input file are shown here (heading not included to save space): Code:
seaLevel 0.00; //seaLevelAsReference false; // A list of the relaxation zones in the simulation. The parameters are given // in a <name>Coeffs below. relaxationNames (inlet outlet); initializationName outlet; inletCoeffs { waveType stokesFirst; // Regular waves depth 0.40000; // Water Depth period 2.0; // Wave period phi 0.00000; // Phase direction (1.0 0.0 0.0); // Direction of incoming waves height 0.1; // Wave height in meters // Relaxation zone is where waves are initiated relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType INLET; startX (-5.0 -3.0 0); endX ( 0.0 3.0 0); orientation (1.0 0.0 0.0); } }; outletCoeffs { waveType potentialCurrent; U (0 0 0); Tsoft 2; relaxationZone { relaxationScheme Spatial; relaxationShape Rectangular; beachType Empty; relaxType OUTLET; startX (15 -3 0); endX (20 3 0); orientation (1.0 0.0 0.0); } }; // *************************************************************************// Thank you again for your time |
|
December 7, 2015, 11:33 |
|
#12 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hallo Ariel,
My only guesses are that you have either way too few cells per wave length or your specification of the water depth does not match that given by your geometry. Kimd regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
December 10, 2015, 08:22 |
|
#13 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
Hi Niels,
Thanks again for getting back to me. Ok, this did seem to be the problem. I realised I only had a few cells per wavelength so I have increased that to approx. 75 cells per wavelength. Is there a general value of cell per wavelength that should be followed? I am also attempting to run a case with flow over a cylinder using an extension of the same mesh set up from the potentialFoam cylinder tutorial (the entire field is set up instead of just a quarter). As the mesh is slightly more complicated than a simple wave tank, I have only managed to have 25 cells per wavelength at the inlet. I haven't yet run the case to see the effect it has. I have a secondary question in regards to the transportProperties dictionary that is used in each tutorial (I think that the same ones are used in interFoam as well). I noticed that in the github versions of the tutorials, there is no transportProperties file. Why is this file missing in the tutorials? |
|
December 10, 2015, 11:18 |
|
#14 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Good afternoon,
@Ariel: The transportProperties are copied to the correct location at the time of execution of the tutorial. This procedure was needed in order to preserve cross version compatibility of waves2Foam. With respect to the discretisation of the computational domain, then 25 cells per wave length is definitely too little and so might 75 be. The correct answer will rely on your actual problem and I recommend you to perform some testing on your own. 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; August 25, 2018 at 12:13. Reason: removed answers to other posts that were on the main thread |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tutorial - Heave and Pitch Simulation of Ship hull moving through head sea waves | Cam | FLUENT | 6 | February 13, 2019 18:12 |
Cylinder tutorial | robbo | OpenFOAM Running, Solving & CFD | 39 | June 7, 2018 07:07 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 19:43 |
how to apply an sudden displacement or Force of a cylinder with solid solver? | allenfieldin | OpenFOAM Running, Solving & CFD | 11 | February 15, 2015 20:37 |
tutorial for solving oscillating cylinder problem | CH | FLUENT | 8 | April 2, 2014 10:56 |