|
[Sponsors] |
September 20, 2018, 13:38 |
pointScalarField patch names
|
#1 |
New Member
Join Date: Sep 2018
Posts: 6
Rep Power: 8 |
Hi,
I am trying to use a pointScalarField in my solver for foam-extend 4.0, which compiles with no issue. However, while running the solver crashes with a segmentation fault at output timesteps. Debugging I know the crashing line is GeometricBoundaryField.C:530 Code:
this->operator[](patchi).patch().name() The name() method in the pointPatch class is a pure virtual function (see pointPatch.H:127), so that's why calling it crashes the solver. Debugging other foam-extend's default solvers that use a pointTypeField it seems most call the name() method from facePointPatch, which is a base class for most pointPatch types. So, I guess the problem is that the patches of my pointScalarField are not of any type. Shouldn't they know the type from boundary definitions at polymesh/boundary?. All of my patches are of type patch. I just don't see what I'm doing differently from the default solvers... Thank you |
|
September 21, 2018, 04:58 |
|
#2 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Hi,
My guess is that the pointMesh is not constructed correctly. Just callin a normal constructor won’t do: you need a reference to a meshObject Const pointMesh& pm = pointMesh::New(mesh); Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
September 21, 2018, 13:16 |
|
#3 |
New Member
Join Date: Sep 2018
Posts: 6
Rep Power: 8 |
Turns out my (silly) mistake was creating the pointMesh object locally on a function, thus erasing it from memory once the function ended.
Thank you for your help! |
|
September 21, 2018, 18:36 |
|
#4 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
What can I say debugging service without looking at the code!
I think I’ll call myself Professor for the rest of the day...
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
y+ and u+ values with low-Re RANS turbulence models: utility + testcase | florian_krause | OpenFOAM | 114 | August 23, 2023 06:37 |
Near wall treatment in k-omega SST | Arnoldinho | OpenFOAM Running, Solving & CFD | 38 | March 8, 2017 14:48 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[Gmsh] Import gmsh msh to Foam | adorean | OpenFOAM Meshing & Mesh Conversion | 24 | April 27, 2005 09:19 |
Multicomponent fluid | Andrea | CFX | 2 | October 11, 2004 06:12 |