|
[Sponsors] |
January 28, 2021, 08:04 |
Specify value of surfaceVectorField
|
#1 |
New Member
chen yu Huang
Join Date: Nov 2019
Posts: 18
Rep Power: 6 |
Hello,
I have a problem when I specify surfaceVectorField. I will compute flow velocity of each cell face by my own program instead of using fvc::interpolation(U). So I declare a surfaceVectorField called Uf in the createFields.H, just like velocity: surfaceVectorField Uf ( IOobject ( "Uf", runTime.timeName(), mesh, IOobject::READ_IF_PRESENTS, IOobject::NO_WRITE ), mesh ); In each time step I will assign Uf, for example Uf[faceID].x()=x velocity I computed ,which is also applied for y and z But while executing the program, I have this error: free(): invalid pointer Aborted (core dumped) If I comment this line, then there be no problem. It looks like if I specify Uf directly, the program will free Uf twice. My questions are: 1. How do I assign surfaceVectorField by value and 2. why Uf will be free twice? I have earlier did the same to velocity (volVectorField) but there is no problem. I will appreciate for any advice. Thank you |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can multiple a volScalarField with a surfaceVectorField | ndtrong | OpenFOAM Programming & Development | 2 | December 12, 2019 19:48 |
Syncing surfaceVectorField data across processors | D.R. | OpenFOAM Running, Solving & CFD | 0 | November 2, 2016 09:05 |
SurfaceVectorField not recognized? | Verse | OpenFOAM Programming & Development | 1 | September 18, 2016 08:57 |
surfaceVectorField | liuke870915 | OpenFOAM Programming & Development | 6 | April 17, 2013 20:07 |
surfaceVectorField | lulo | OpenFOAM | 0 | August 15, 2011 08:17 |