|
[Sponsors] |
Modified pointVectorField.boundaryField is not written to output file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 17, 2018, 10:49 |
Modified pointVectorField.boundaryField is not written to output file
|
#1 |
Member
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10 |
Dear foamers,
I'm trying to interpolate a surfaceVectorField to pointVectorField and then write it to a output file with the following code, but nothing gets written: Code:
pointVectorField sensPointVec ( IOobject ( "sensPointVec", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), pointMesh::New(mesh), dimensionedVector("(0,0,0)", dimless, vector::zero), "fixedValue" ); Code:
PrimitivePatchInterpolation<primitivePatch> patchInterpolator ( mesh.boundaryMesh()[bi] ); vectorField interpSensPointVec = patchInterpolator.faceToPointInterpolate(sensSurfaceVec.boundaryField()[bi]); Info << "interpSensPointVec " << interpSensPointVec << endl; sensPointVec.boundaryFieldRef()[bi] = interpSensPointVec; Code:
boundaryField { inlet { type fixedValue; value uniform (0 0 0); } outlet { type fixedValue; value uniform (0 0 0); } ... |
|
January 18, 2018, 11:42 |
|
#2 |
Member
Lennart
Join Date: Feb 2016
Posts: 46
Rep Power: 10 |
I think I found the solution, you just need to replace the = in the assignment with ==
Code:
sensPointVec.boundaryFieldRef()[bi] == interpSensPointVec; |
|
Tags |
boundaryfield, output, pointvectorfield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 10:07 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 18:34 |
what is swap4foam ?? | AB08 | OpenFOAM | 28 | February 2, 2016 02:22 |
SparceImage v1.7.x Issue on MAC OS X | rcarmi | OpenFOAM Installation | 4 | August 14, 2014 07:42 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |