|
[Sponsors] |
Difference between "scalarField" and "const scalar" |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 9, 2015, 17:44 |
Difference between "scalarField" and "const scalar"
|
#1 |
New Member
Yi Han
Join Date: Oct 2013
Location: Laramie WY
Posts: 15
Rep Power: 13 |
Hi everyone,
I am making a new boundary type for the inlet temperature by referring the "parabolicVelocityFvPatchVectorField" and "AblVelInletFvPatchVectorField". I got confused with the "scalarField" & "const scalar" in the .H and .C files. What is the difference between them? Can anyone show it with example? Thanks soo much |
|
June 13, 2015, 09:16 |
|
#2 | |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
Quote:
A scalarField is as field of scalars, as the name says. To stay in OpenFOAM terms a scalarField is basically a List of scalar (with some addons), where a List is OpenFOAM's own array template class. So, in a general C++ context you could see it as a array of double (roughly speaking). And since I guess that your next question would be: What is a volScalarField? Here the answer: A volScalarField is a scalarField defined on the computational mesh. This means a that the size of a volScalarField is equal to the mesh size, hence the values in a volScalarField are linked to the cells in the computational mesh. Hope this helps to clear things up. Cheers, Armin P.S.: These are very rough explanations to get you started and are by far not complete descriptions. |
||
June 15, 2015, 02:24 |
|
#3 |
New Member
Yi Han
Join Date: Oct 2013
Location: Laramie WY
Posts: 15
Rep Power: 13 |
Hi Armin,
Thanks so much for your reply. It is very helpful. Sincerely, Yi |
|
June 15, 2015, 02:42 |
Hi Armin, Thanks so much for your reply. It is very helpful. Sincerely, Yi
|
#4 |
New Member
Yi Han
Join Date: Oct 2013
Location: Laramie WY
Posts: 15
Rep Power: 13 |
Hi Armin,
Thanks so much for your reply. It is very helpful. Sincerely, Yi |
|
Tags |
boundary types, const scalar, scalarfield |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
An error about "const volVectorField& U = db().lookupObject<volVectorField>("U");" | babala | OpenFOAM Programming & Development | 1 | December 3, 2014 04:25 |