# Multiplication of two volVectorField

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 30, 2016, 11:50 Multiplication of two volVectorField #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.` The Problem is that I need to scale every component of U by it's own value. I need to multiply the vector field U by another vectorField. Code: ```volVectorField S = [(s11, s12, s13), (s21,s22,s33),...] volVectorField scaledU = [(s11*U11,s12*U12,s13*U13(), (s21*U21,s22*U22,s23*U23(),...]``` Does anyone have a hint how i could realize this?

 May 30, 2016, 12:08 #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)`