|
[Sponsors] |
April 16, 2013, 06:39 |
surfaceVectorField
|
#1 |
New Member
liuke
Join Date: Apr 2013
Posts: 20
Rep Power: 13 |
how to transformed a surfaceVectorField variable into volVectorField variable .
or transformed a surfaceVectorField variable into surfaceScalarField variable |
|
April 16, 2013, 08:41 |
|
#2 | ||
Senior Member
Fumiya Nozaki
Join Date: Jun 2010
Location: Yokohama, Japan
Posts: 266
Blog Entries: 1
Rep Power: 18 |
Quote:
Quote:
Best regards, Fumiya |
|||
April 16, 2013, 12:23 |
|
#3 |
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16 |
Code:
how to transformed a surfaceVectorField variable into volVectorField variable . Code:
or transformed a surfaceVectorField variable into surfaceScalarField variable Code:
label patchWall = mesh.boundaryMesh().findPatchID("wall"); //patchID = id of the patch wall const fvPatch& cPatch = mesh.boundary()[patchWall]; forAll(cPatch, facei) //facei = id of the face { ScalarVar.boundaryField()[patchWall][facei] = VectorVar.boundaryField()[patchWall][facei].component(0) + VectorVar.boundaryField()[patchWall][facei].component(1) + VectorVar.boundaryField()[patchWall][facei].component(3); } |
|
April 17, 2013, 08:12 |
to fumiya
|
#4 |
New Member
liuke
Join Date: Apr 2013
Posts: 20
Rep Power: 13 |
||
April 17, 2013, 08:15 |
to fredo490
|
#5 | |
New Member
liuke
Join Date: Apr 2013
Posts: 20
Rep Power: 13 |
Quote:
can the function mag() do this conversion? |
||
April 17, 2013, 09:31 |
|
#6 |
Senior Member
HECKMANN Frédéric
Join Date: Jul 2010
Posts: 249
Rep Power: 16 |
it might work, I don't know if the volume vector field has this member. You can write it and try to compile.
|
|
April 17, 2013, 20:07 |
|
#7 |
New Member
liuke
Join Date: Apr 2013
Posts: 20
Rep Power: 13 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
fvc::div for surfaceVectorField | ARTem | OpenFOAM Programming & Development | 4 | November 2, 2018 12:41 |
volVectorField -> surfaceVectorField | latvietis | OpenFOAM Running, Solving & CFD | 1 | March 20, 2012 11:19 |
surfaceVectorField | lulo | OpenFOAM | 0 | August 15, 2011 08:17 |
laplacian | nimasam | OpenFOAM | 7 | May 9, 2011 16:06 |