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

[waves2Foam] Surface elevation sigsegv on "sampledSurfaceElevation::sampleIntegrateAndWr ite"

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2016, 07:02
Default Surface elevation sigsegv on "sampledSurfaceElevation::sampleIntegrateAndWr ite"
  #1
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
Hi, I'm trying to use the surface elevation utility and probes to calculate velocities but I'm getting this error after a few time steps:

Code:
smoothSolver:  Solving for alpha.water, Initial residual = 0.000163258, Final residual = 1.37002e-13, No Iterations 2
Phase-1 volume fraction = 0.499709  Min(alpha1) = 0  Max(alpha1) = 1
MULES: Correcting alpha.water
Phase-1 volume fraction = 0.499709  Min(alpha1) = -1.57355e-14  Max(alpha1) = 1
Relaxing time: 0.52 s
DILUPBiCG:  Solving for Ux, Initial residual = 0.0367039, Final residual = 4.33518e-12, No Iterations 2
DILUPBiCG:  Solving for Uy, Initial residual = 0.182004, Final residual = 5.89471e-11, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.0629783, Final residual = 1.61046e-11, No Iterations 2
GAMG:  Solving for p_rgh, Initial residual = 0.0738539, Final residual = 5.28775e-08, No Iterations 5
GAMG:  Solving for p_rgh, Initial residual = 9.70499e-06, Final residual = 5.86964e-08, No Iterations 3
time step continuity errors : sum local = 2.27865e-08, global = 6.40584e-09, cumulative = 6.33201e-08
GAMG:  Solving for p_rgh, Initial residual = 0.000241955, Final residual = 7.58907e-08, No Iterations 4
GAMG:  Solving for p_rgh, Initial residual = 3.12518e-07, Final residual = 3.94517e-08, No Iterations 1
time step continuity errors : sum local = 1.5316e-08, global = 5.29587e-09, cumulative = 6.86159e-08
GAMG:  Solving for p_rgh, Initial residual = 2.65494e-06, Final residual = 5.06483e-08, No Iterations 1
GAMG:  Solving for p_rgh, Initial residual = 5.31601e-08, Final residual = 9.61977e-09, No Iterations 1
time step continuity errors : sum local = 3.73531e-09, global = 3.0406e-09, cumulative = 7.16565e-08
ExecutionTime = 73.44 s  ClockTime = 74 s

#0  Foam::error::printStack(Foam::Ostream&) in "/home/ariel/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigSegv::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::sampledSurfaceElevation::sampleIntegrateAndWrite(Foam::sampledSurfaceElevation::fieldGroup<double>&) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2FoamSampling.so"
#4  Foam::OutputFilterFunctionObject<Foam::sampledSurfaceElevation>::execute(bool) in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/lib/libwaves2FoamSampling.so"
#5  Foam::functionObjectList::execute(bool) in "/home/ariel/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6  Foam::Time::run() const in "/home/ariel/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#7
 in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/bin/waveFoam"
#8  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#9
 in "/home/ariel/OpenFOAM/ariel-2.3.0/platforms/linux64GccDPOpt/bin/waveFoam"
Segmentation fault
My postProcessingProperties file:

Code:
deleteParentOutputDirectory false;

regularSpectrum
{
    callName surfaceElevation;

    removeDuplicate true;
    inputDir surfaceElevationAnyName;

    deltaT 0.01;
    tMin   10.0; //0; Default: minimum time
    //tMax    20; // Default: maximum time

    // The action list is a set of processes on the data
    actionList ( interpolateSurfaceElevation powerSpectraLS write2Ascii removeData );

    nFreq 4;
    period 3;
    allDataSets true;
}
My probeDefinitions file:

Code:
surfaceElevationAnyName
{
    type waveGauge;

    pointDistribution lineDistribution;
    N 11;
    //xValues nonuniform List<scalar> 11(-3.0 -2.0 -1 -0.5 0.5 0.75 1.5 5.0 10.0 15.0 20.0);
    //yValues uniform 0;
    //zValues uniform 0.05;
    linestart (-1 0 0.05);
    lineend   (3  0 0.05);
    add       (0 0 0.45); //( 0 0.45 0);
    axis      z;
    stretch 1.5;
}
I am guessing it has something to do with the nFreq value or else the sampling time but I'm not sure. I tried uncommenting tMax and starting tMin at 0 but this did not resolve the problem and caused the same error.

Does anyone know what this error means or where it's coming from?
arieljeds is offline   Reply With Quote

Old   January 19, 2016, 12:16
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 afternoon all,

I will try to answer some of the questions:

@Ariel #1135: It is quite likely that your wave gauges are outside of your computational domain.

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 08:34. Reason: removed answers to other posts that were on the main thread
ngj is offline   Reply With Quote

Old   January 29, 2016, 11:04
Default
  #3
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
Niels.

thank you for your response. I am now trying to fix the location of the wave gauges but am very confused by what is happening with this in the waveFlume tutorial:

First of all, in this line in the controlDict file:
Code:
#includeIfPresent "../waveGaugesNProbes/surfaceElevationAnyName_controlDict";
To execute this as it is, I presume that the user must first create the file:
Code:
constant/probeDefinitions
. In the waveFlume example, this file is given as:

Code:
surfaceElevationAnyName
{
    type waveGauge;

    pointDistribution lineDistribution;
    N 179;
    linestart (  0.10  -0.3  0.05);
    lineend   ( 17.9  -0.3 -0.05);
    add       ( 0 0.45 0);
    axis      y;
    stretch 1.;
}
In my case, I have gravity acting in the z-direction, so presumably I want to change axis to z? However, I'm very confused about a few other things:

1) What are the add and stretch values?
2) If I want to interpolate for surface elevation at several different areas in my wave tank, say to look for surface elevation decay, how would I set up more than one lineDistribution or can I do this in the way that I would do it for a system/probeDict file?


Thanks a lot for any advice,
Ariel
arieljeds is offline   Reply With Quote

Old   January 29, 2016, 15:49
Default
  #4
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 Ariel,

Note that there are generated VTK-files that show the locations of your wave gauges, when you execute waveGaugesNProbes. This makes it trivial to explore the effects of various parameters in paraView.

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

Old   February 1, 2016, 08:33
Default
  #5
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
Hi Niels,

Thank you for your response. I am able to view the probes but am still not understanding how to manipulate some of the parameters. I have tried to turn on and off and change all features but just haven't been able to set up what I want for some reason.

I am trying to calculate the surface elevation at different locations down a wave tank, I think just like the waveFlume tutorial. My wave tank is 600 meters long, the wavelength is 93 m, the depth is 10 m and gravity acts in the z direction. When I view the vtk file in parafoam, it simply doesn't look correct...as if the probes aren't stretching from the bottom to the sea surface or their location doesn't seem right. Here is my constant/probeDefinitions file:

Code:
surfaceElevationAnyName
{
    type waveGauge;    
    
    pointDistribution lineDistribution;
    N 599;
    linestart ( 0.10   -3 -10);
    lineend   (599.9   3  4);
    add       ( 0 0 0.5);
    axis      z;
    stretch 1.;
}
It would be helpful to understand what each parameter is changing because even though I'm basing it off the waveFlume tutorial, I just can't seem to get them set up correctly. I would really appreciate an explanation or description of the parameters.

Thank you


EDIT: Ok I seem to have correctly placed the probes but it was almost by luck..
- Can you please explain the "add () " parameter?
- I messed around with the y-value and it didn't seem to make a difference... I don't understand why not?

Last edited by arieljeds; February 1, 2016 at 08:46. Reason: Solved the problem but still not fully understanding
arieljeds is offline   Reply With Quote

Old   February 1, 2016, 12:44
Default
  #6
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
Hallo Ariel,

It is good that you got it working. First of all, allow me to say that you have full access to the source code, so it should be fairly straight forward to figure out, what the code it doing.

That said, for the 'pointDistribution' of type 'lineDistribution', then the 'linestart', 'lineend', 'N' and 'stretch' define N points along a line (e.g. a horizontal line). The stretch parameter allows you to define a non-equidistant stretch of the points.

The keyword 'axis' comes from the original sample utility and should be given as your vertical axis. The parameter 'add' is a vector (vertical), which is added to each of the points on the lineDistribution. The original and translated point (translated by 'add') define a vertical line that is your wave gauge.

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

Old   February 1, 2016, 12:49
Default
  #7
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10
arieljeds is on a distinguished road
Niels -


thank you very much for your clear explanation. I've been looking through the source code and did manage to get it working but was still struggling to really picture what was happening! Very silly, I know.. I do seem to have it working although I had a look at the free surface elevation and it's always a negative value.

I will need to check where my probes are but I thought I had set them up to extend to 4 meters above the sea surface, which I expected would give negative and positive values. I am not looking at my code at the moment and will try and fix this tomorrow based on what you've said.

Thanks again
Ariel
arieljeds is offline   Reply With Quote

Old   June 12, 2016, 10:48
Default
  #8
New Member
 
Muhammad Nouman Khalid
Join Date: Mar 2016
Posts: 6
Rep Power: 10
k.nomi is on a distinguished road
Quote:
Originally Posted by arieljeds View Post
Niels -


thank you very much for your clear explanation. I've been looking through the source code and did manage to get it working but was still struggling to really picture what was happening! Very silly, I know.. I do seem to have it working although I had a look at the free surface elevation and it's always a negative value.

I will need to check where my probes are but I thought I had set them up to extend to 4 meters above the sea surface, which I expected would give negative and positive values. I am not looking at my code at the moment and will try and fix this tomorrow based on what you've said.

Thanks again
Ariel
Hi Ariel,

Hope you are doing fine. I am having the same problem as yours with probe definition. My gauges are well within the computational domain as i see them in paraFoam. but when I execute postProcessWaves2Foam it shows the same error as yours. how was you able to fix it? I would really appreciate your help.

Regards
Khalid
k.nomi 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
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
SSIIM- F 36 2: computation of the vertical water surface elevation Mummputz Main CFD Forum 2 July 1, 2015 04:52
chart of surface elevation against time mohammad_1986 CFX 1 January 17, 2013 20:43
STL units and Surface elevation plot MAB FLOW-3D 11 May 9, 2010 15:55
ploting surface elevation Tony Campbell Siemens 5 January 29, 2005 16:09


All times are GMT -4. The time now is 20:00.