|
[Sponsors] |
Assigning volVectorField components from three different volScalarField |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 15, 2016, 12:33 |
Assigning volVectorField components from three different volScalarField
|
#1 |
New Member
Aldo Muņoz
Join Date: Feb 2016
Posts: 4
Rep Power: 10 |
Hi foamers,
I need to assign values from three volScalarField to the components of a volVectorFIeld. Is there any direct way to do this operation? Otherwise, they have a tip for this. thanks in advance to anyone who can help me. |
|
August 16, 2016, 02:28 |
|
#2 | ||
Member
Jerry
Join Date: Oct 2013
Location: Salt Lake City, UT, USA
Posts: 52
Rep Power: 13 |
Hi,
It might look like this: supposing you have: Quote:
Quote:
|
|||
August 16, 2016, 10:41 |
|
#3 | |||
New Member
Aldo Muņoz
Join Date: Feb 2016
Posts: 4
Rep Power: 10 |
Thanks for your reply,
I used your code in this way: Quote:
Quote:
Quote:
I appreciate your help, |
||||
August 16, 2016, 12:37 |
|
#4 |
Senior Member
Sergei
Join Date: Dec 2009
Posts: 261
Rep Power: 22 |
You should change
Code:
fvPatchField<vector> &pv = Re.boundaryField()[patchID]; Code:
fvPatchField<vector> &pv = Re.boundaryFieldRef()[patchID]; |
|
August 16, 2016, 12:43 |
|
#5 |
New Member
Aldo Muņoz
Join Date: Feb 2016
Posts: 4
Rep Power: 10 |
Now it works.
Thanks a lot! |
|
Tags |
components, volvectorfield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
volScalarField to volVectorField | syavash | OpenFOAM Programming & Development | 16 | September 28, 2018 14:23 |
Compressible 2D airfoil rhoSimpleFoam fatal error volScalarField none | jfournier | OpenFOAM Running, Solving & CFD | 4 | September 28, 2017 07:28 |
execFlowFunctionObjects - unknown field problem | Toorop | OpenFOAM Post-Processing | 16 | March 14, 2016 04:25 |
using chemkin | JMDag2004 | OpenFOAM Pre-Processing | 2 | March 8, 2016 23:38 |
writing execFlowFunctionObjects | immortality | OpenFOAM Post-Processing | 30 | September 15, 2013 07:16 |