|
[Sponsors] |
Clarification in surfaceScalarField Initialization |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 31, 2019, 10:54 |
Clarification in surfaceScalarField Initialization
|
#1 |
New Member
Join Date: Feb 2017
Posts: 5
Rep Power: 9 |
Code:
surfaceScalarField rhoPhi ( IOobject ( "rhoPhi", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), fvc::interpolate(rho)*phi ); thanks |
|
August 1, 2019, 02:05 |
|
#2 |
Senior Member
|
Hi,
It means that rho (which is known at the cell centres) is interpolated to the face centers (where phi is known). Then they are multiplied to get rho*phi at the face centers. You now have the mass flux over the face of the cell. Cheers, Tom |
|
August 1, 2019, 04:09 |
|
#3 |
New Member
Join Date: Feb 2017
Posts: 5
Rep Power: 9 |
Hi,
Thanks for this... But what I am interested is in the general definition of the volScalarField or the surfaceScalarField. I want to know whether the function we are passing as an argument ( in this case "fvc::interpolate(rho)*phi"), is just to initialize the field or does openfoam use the function everytime rho is updated in the code |
|
August 1, 2019, 04:39 |
|
#4 |
Member
Hosein
Join Date: Nov 2011
Location: Germany
Posts: 93
Rep Power: 14 |
Hey,
This is an object construction. And the constructor is called once, when the object is created. However, the content might change along the way... |
|
August 1, 2019, 04:42 |
|
#5 |
Senior Member
|
Hi,
I guess this depends on when the function is called. It can typically be within the createFields.H, which is usually at the start of the simulation, so it is initialized, but it can also be within the time loop. A volScalarField is a field (basically a list) of scalars, where each scalar is defined for a volume (i.e. in the cell center) A surfaceScalarField is a field of scalars, where each scalar is defined for a surface (i.e. in the face center). Cheers, Tom |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Upwind Gradient Not Recognizing surfaceScalarField | MajidHagh | OpenFOAM | 2 | October 30, 2019 11:58 |
FMG initialization query | Mohsin | FLUENT | 6 | November 2, 2016 02:02 |
CFX Transient Initialization | frossi | CFX | 1 | June 17, 2016 09:31 |
Full Multigrid Initialization | Mr.Goodcat | FLUENT | 0 | March 17, 2016 06:43 |
Function returning uniform surfaceScalarField | lichmaster | OpenFOAM | 3 | June 25, 2012 03:46 |