|
[Sponsors] |
multiplicate all elements of volScalarField with scalar to get new volScalarField |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 17, 2014, 06:27 |
multiplicate all elements of volScalarField with scalar to get new volScalarField
|
#1 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi,
I want to do something like this: Code:
volScalarField TWO = volScalarField ONE * dimensionedScalar SCALAR; greetings maybee |
|
February 18, 2014, 16:20 |
|
#2 |
Member
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 14 |
I am 99% sure this multiplication is already implemented. All you have to do is declare ONE and SCALAR with proper values/declarations prior to declaring TWO like you did there. Then its as simple as:
//ONE and SCALAR declarations volScalarField TWO = ONE * SCALAR; Sometimes the best way to figure things out is to simply try it and see what the results are! |
|
February 18, 2014, 16:43 |
|
#3 |
Senior Member
Join Date: Jan 2012
Posts: 166
Rep Power: 14 |
hi,
thx for the help . I know it is good to just try things out, but in this case I am implementing a new algorithm into the multiphaseEulerFoam solver and there are a few "construction sites" now - so I can t test it so easy within the solver - though it is right that I could check if the compiler gives me some error messages for specific code segments . |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 08:15 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |
writing execFlowFunctionObjects | immortality | OpenFOAM Post-Processing | 30 | September 15, 2013 07:16 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 02:27 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 13, 2001 00:19 |