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

[waves2Foam] surfaceElevation: "cell does not contain point"

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2017, 08:55
Default surfaceElevation: "cell does not contain point"
  #1
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 9
arieljeds is on a distinguished road
Hi all -

I have a frustrating problem using the surfaceElevation utility. I use this often without problems with exactly the same locations, same domain size, but I can't seem to figure out what's happening here. Is there a way to view the wave gauge locations using surfaceElevation? I know you can do it using waveGaugesNProbes but I couldn't figure out how to set up my surfaceElevation wave gauges using that.

I'm getting the following error:

Code:
Reading g

Reading waveProperties


--> FOAM FATAL ERROR: 
Found cell 1719049 using face 9977105. But cell does not contain point (3.04 3.04 -14.481)

    From function sampledSet::getCell(const label, const point&)
    in file sampledSet/sampledSet/sampledSet.C at line 76.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::error::abort() at ??:?
#2  Foam::sampledSet::getCell(int, Foam::Vector<double> const&) const at ??:?
#3  Foam::midPointSet::genSamples() at ??:?
#4  Foam::midPointSet::midPointSet(Foam::word const&, Foam::polyMesh const&, Foam::meshSearch const&, Foam::dictionary const&) at ??:?
#5  Foam::sampledSet::addwordConstructorToTable<Foam::midPointSet>::New(Foam::word const&, Foam::polyMesh const&, Foam::meshSearch const&, Foam::dictionary const&) at ??:?
#6  Foam::sampledSet::New(Foam::word const&, Foam::polyMesh const&, Foam::meshSearch const&, Foam::dictionary const&) at ??:?
#7  void Foam::PtrList<Foam::sampledSet>::read<Foam::sampledSet::iNew>(Foam::Istream&, Foam::sampledSet::iNew const&) at ??:?
#8  Foam::sampledSurfaceElevation::read(Foam::dictionary const&) at ??:?
#9  Foam::sampledSurfaceElevation::sampledSurfaceElevation(Foam::word const&, Foam::objectRegistry const&, Foam::dictionary const&, bool) at ??:?
#10  main at ??:?
#11  __libc_start_main in "/lib64/libc.so.6"
#12  ? at /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:116
Aborted (core dumped)

I know this has to do with there not being a cell where it's attempting to sample but there should definitely be a cell there?? I want to view where it's trying to sample because I can't figure out why it thinks there's nothing there. I am using 160 wave gauges around a cylinder so this is just a snippet of my surfaceElevationDict:

Code:
setFormat raw;

interpolationScheme cellPoint;

// Fields to sample.
fields
(
    alpha.water
);

sets
(
   loc2_gauge_0
    {
        type         midPoint;
        axis         z;
        start        (4.30 0 -15);
        end          (4.30 0 15);
        nPoints      100;
    }

    loc2_gauge_1
    {
        type         midPoint;
        axis         z;
        start        (3.97 1.65 -15);
        end          (3.97 1.65 15);
        nPoints      100;
    }

    loc2_gauge_2
    {
        type         midPoint;
        axis         z;
        start        (3.04 3.04 -15);
        end          (3.04 3.04 15);
        nPoints      100;
    }

    loc2_gauge_3
    {
        type         midPoint;
        axis         z;
        start        (1.65 3.97 -15);
        end          (1.65 3.97 15);
        nPoints      100;
    }

);
I'm using GMSH here so I'm attaching my log.checkmesh file.

Thanks in advance for any help on this.

Ariel
Attached Files
File Type: txt log.checkmesh.txt (3.0 KB, 1 views)
arieljeds is offline   Reply With Quote

Old   January 15, 2017, 13:58
Default
  #2
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,894
Rep Power: 35
ngj will become famous soon enoughngj will become famous soon enough
Good evening.

@Ariel: I am not familiar with this error. I can only recommend you to track down the problem by removing one wave gauge at the time.

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

Old   January 19, 2017, 07:14
Default
  #3
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 9
arieljeds is on a distinguished road
Hi Niels,

Thanks for the reply. Is there some way to set up the waveGaugesNProbes using sets? I have my probes in pretty specific locations and I can't figure out how to do that in probeDefinitions (as in, can I define the sets within this file somehow instead of using some automated distribution?) Or is there a way to view the surfaceElevation probes using surfaceElevationDict (which I know I can do if I run waveGaugesNProbes)?

I tried using userDefinedDistribution but then I got the error:

Code:
"ill defined primitiveEntry starting at keyword 'sets' on line 25...
Thanks again for your help

Ariel


**EDIT** Ok so I have fixed my problem but I still have two queries:

1) I don't understand why it was fixed, the changes I made were something like 5.06966 to 5.07, and this fixed it. I really don't understand how the tiny change would have had such an effect? Also note, I have used the same surfaceElevationDict with a range of simulations with the same computational domain size, although a slightly different mesh resolution (this case is slightly coarser than others)

2) I would still like to find a way to view my wave gauges (create a vtk file with surfaceElevationDict)

Last edited by arieljeds; January 19, 2017 at 07:57. Reason: Fixed problem, although don't understand how
arieljeds is offline   Reply With Quote

Old   January 19, 2017, 07:16
Default
  #4
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 9
arieljeds is on a distinguished road
Quote:
Originally Posted by j91 View Post
Hi,

I have a question about the size of relaxation zones used in waves2foam. Typically I see recommendations of "about a wavelength" as a recommended length for the inlet zone and outlet zone (each), but why is this the case? What kind of error do you run into if you shrink the relaxation zones to be much smaller, say 50% or 10% or even 1% of a wavelength? How drastic are the effects if you approach the equivalent of a boundary inlet/outlet and try to make a relaxation "zone" just a few cells long? (I think OLAFOAM has a generation system a little like this, although using the boundary itself?)

Thanks in advance for your time. I have looked around in literature but it's difficult to find practicalities like this, especially as people tend to publish what works rather than what breaks.

I found that if you shrink it too much, the wave doesn't get fully absorbed and you will see some reflection. I played around with the mu value (alphaCoefficient in relaxation zone definition) and lowered it to 1 and was able to reduce the relaxation zone to just under 1 wavelength without getting reflection. Hope that helps!
arieljeds is offline   Reply With Quote

Old   January 19, 2017, 16:53
Default
  #5
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,894
Rep Power: 35
ngj will become famous soon enoughngj will become famous soon enough
Hi Ariels,

I have no idea of the cause of the error. It is most likely related to the sampling function in your version of OpenFoam. An error similar to the reason that pointInMesh for snappyHexMesh is not allowed on grid lines.

You can automatically create vtk-files, if you use the utility waveGaugesNProbes based on input in constant/probeDefinitions.

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   January 23, 2017, 11:44
Default
  #6
Senior Member
 
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 9
arieljeds is on a distinguished road
Hi Niels,

Thanks for your response. Yes I usually would use the waveGaugesNProbes to view the wave gauges but I could not figure out how to set up the locations of the probes in the same way I'm doing that in my surfaceElevationDict (I don't want them automatically set up). Is there a way to create the vtk file on its own or using surfaceElevation? Or else a better way to set up the probeDefinitions file to specify locations?

Best,
Ariel
arieljeds is offline   Reply With Quote

Old   January 25, 2017, 14:35
Default
  #7
ngj
Senior Member
 
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,894
Rep Power: 35
ngj will become famous soon enoughngj will become famous soon enough
Hi Ariel,

There is a method already in waveGaugesNProbes, where you can provide user-defined location. I think it is called userDefinedDistribution instead of lineDistribution. I do not have access to the source code right now, so cannot check, but it should be easy for you.

A VTK-file will be generated, if you use this approach.

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Fluent UDF wrong number of cells in parallel - correct in serial dralexpe Fluent UDF and Scheme Programming 7 May 17, 2018 09:26
[snappyHexMesh] snappyHexMesh and cyclic boundaries Ruli OpenFOAM Meshing & Mesh Conversion 2 December 9, 2013 07:51
[blockMesh] error EOF in blockMesh Ahmed Khattab OpenFOAM Meshing & Mesh Conversion 7 May 17, 2012 01:37
Warning 097- AB Siemens 6 November 15, 2004 05:41
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


All times are GMT -4. The time now is 13:45.