|
[Sponsors] |
Exporting normal vectors of faces as surfaceVectorFields |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 23, 2023, 10:54 |
Exporting normal vectors of faces as surfaceVectorFields
|
#1 |
New Member
Join Date: Dec 2021
Posts: 27
Rep Power: 5 |
Hello friends,
I want to export the normal vectors of all faces as surfaceVectorField. Since I couldn't find any functionObjects that allow me to do so, I followed some basic direction that was suggested on this forum (About extracting the normals to faces on a patch). The advice was to modify the function object writeCellCentres and that works out pretty well so far. The following code is a modification of the write-function of the mentioned function object. Code:
bool Foam::functionObjects::writeSurfaceNormalVectors::write() { surfaceVectorField nv ( IOobject ( "NormalVectors", time_.timeName(), mesh_, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), mesh_.Sf() ); Log << type() << " " << name() << " write:" << nl << " writing normal vectors field " << nv.name() << " to " << time_.timeName() << endl; nv.write(); } However, when I use utilities like reconstructPar or foamToVTK -faceZones aNiceFaceZone which access these newly generated files, I get the following error: Code:
--> FOAM FATAL ERROR: (openfoam-2206) Not implemented From Foam::slicedFvsPatchField<Type>::slicedFvsPatchField(const Foam::fvPatch&, const Foam::DimensionedField<Type, Foam::surfaceMesh>&, const Foam::dictionary&) [with Type = Foam::Vector<double>] in file fields/fvsPatchFields/basic/sliced/slicedFvsPatchField.C at line 68. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::simpleExit(int, bool) at ??:? #2 Foam::slicedFvsPatchField<Foam::Vector<double> >::slicedFvsPatchField(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::surfaceMesh> const&, Foam::dictionary const&) at ??:? #3 Foam::fvsPatchField<Foam::Vector<double> >::adddictionaryConstructorToTable<Foam::slicedFvsPatchField<Foam::Vector<double> > >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::surfaceMesh> const&, Foam::dictionary const&) at ??:? #4 Foam::fvsPatchField<Foam::Vector<double> >::New(Foam::fvPatch const&, Foam::DimensionedField<Foam::Vector<double>, Foam::surfaceMesh> const&, Foam::dictionary const&) at ??:? #5 Foam::GeometricBoundaryField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>::readField(Foam::DimensionedField<Foam::Vector<double>, Foam::surfaceMesh> const&, Foam::dictionary const&) at ??:? #6 Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>::readFields(Foam::dictionary const&) at ??:? #7 Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>::readFields() at ??:? #8 Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>::GeometricField(Foam::IOobject const&, Foam::fvMesh const&, bool) at ??:? #9 Foam::tmp<Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> > Foam::fvFieldReconstructor::reconstructSurfaceField<Foam::Vector<double> >(Foam::IOobject const&) const at ??:? #10 int Foam::fvFieldReconstructor::reconstructSurfaceFields<Foam::Vector<double> >(Foam::UPtrList<Foam::IOobject const> const&) at ??:? #11 Foam::fvFieldReconstructor::reconstructAllFields(Foam::IOobjectList const&, Foam::wordRes const&) at ??:? #12 ? in ~/OpenFOAM/OpenFOAM-v2206/platforms/linux64GccDPInt32Opt/bin/reconstructPar #13 ? in /lib/x86_64-linux-gnu/libc.so.6 #14 __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6 #15 ? in ~/OpenFOAM/OpenFOAM-v2206/platforms/linux64GccDPInt32Opt/bin/reconstructPar Aborted (core dumped) Best regards, Finn Last edited by finn_amann; February 24, 2023 at 04:03. |
|
Tags |
error, export, surfacevectorfield, vtk |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface | Kryo | OpenFOAM Meshing & Mesh Conversion | 13 | February 17, 2022 08:34 |
decomposePar -allRegions | stru | OpenFOAM Pre-Processing | 2 | August 25, 2015 04:58 |
foam-extend_3.1 decompose and pyfoam warning | shipman | OpenFOAM | 3 | July 24, 2014 09:14 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 20:43 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 16:57 |