|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Join Date: Feb 2014
Posts: 17
Rep Power: 11 ![]() |
Hey,
I'm new to OpenFOAM and want to access the volVectorField U. It's not a problem to scale it by a scalar, simply by writing Code:
volVectorField scaledU = scalar * U. Code:
volVectorField S = [(s11, s12, s13), (s21,s22,s33),...] volVectorField scaledU = [(s11*U11,s12*U12,s13*U13(), (s21*U21,s22*U22,s23*U23(),...] |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
Join Date: Feb 2014
Posts: 17
Rep Power: 11 ![]() |
Sorry, this post was too early.
The Programmers Guide says that the function "scale(a, b)" should be used. Sadly the guide is not up to date at this point for a long time. The function that should be used is Code:
cmptMultiply(a, b) |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Elementwise multiplication operator | johndeas | OpenFOAM Running, Solving & CFD | 3 | March 9, 2019 14:03 |
[Problem] paraFoam Throws volVectorField Error At t=0 for 0/U | iamed18 | OpenFOAM Pre-Processing | 3 | April 11, 2016 11:03 |
Pstream reduce sum volVectorField | ganeshv | OpenFOAM Running, Solving & CFD | 0 | December 11, 2012 15:35 |
multiplication of scalar and volVectorField | mikeP | OpenFOAM | 5 | March 27, 2012 13:34 |
Initialize a uniform 0 volVectorField | Schag | OpenFOAM | 3 | August 26, 2009 11:08 |