CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Can a object of type volScalarField::Internal be assigned to volScalarField?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 26, 2020, 11:58
Default Can a object of type volScalarField::Internal be assigned to volScalarField?
  #1
Senior Member
 
Mandeep Shetty
Join Date: Apr 2016
Posts: 188
Rep Power: 10
granzer is on a distinguished road
Deleted by creator

Last edited by granzer; December 26, 2020 at 13:10.
granzer is offline   Reply With Quote

Old   December 26, 2020, 13:12
Default
  #2
Senior Member
 
Mandeep Shetty
Join Date: Apr 2016
Posts: 188
Rep Power: 10
granzer is on a distinguished road
Say I created an instance of volScalarField::internal called A

Code:
volScalarField::internal A
(........
........
........)
Is it legal to assign A to an object of type volScalarField?
ex:

Code:
volScalarField B = A;
............................(1)

If code-line (1) is legal what is assigned to the boundary field of B since B is a volScalarField and so needs boundary data?

I am asking this after reading 'The Finite Volume Method in Computational Fluid Dynamics: An Advanced Introduction with OpenFOAMŪ and MatlabŪ'
Pg 195.
Screenshot 2020-12-26 223837_del.jpg
granzer is offline   Reply With Quote

Old   December 29, 2020, 01:26
Default
  #3
Senior Member
 
Mandeep Shetty
Join Date: Apr 2016
Posts: 188
Rep Power: 10
granzer is on a distinguished road
Anyone has any insight on this?
granzer is offline   Reply With Quote

Old   December 29, 2020, 06:16
Default
  #4
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 736
Rep Power: 14
Tobermory will become famous soon enough
Seems unlikely, but perhaps just try it and see what the compiler spits out?
Tobermory is offline   Reply With Quote

Old   January 7, 2021, 12:53
Default
  #5
Senior Member
 
Mandeep Shetty
Join Date: Apr 2016
Posts: 188
Rep Power: 10
granzer is on a distinguished road
Yup! it won't compile

Ref:
HTML Code:
https://www.cfd-online.com/Forums/openfoam-programming-development/77966-how-create-volscalarfield-mesh-v.html
granzer is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
reactingMultiphaseEulerFoam tonnykz OpenFOAM Running, Solving & CFD 2 June 15, 2020 03:09
rhoSimpleFoam - Newbie Issues AndyR OpenFOAM Running, Solving & CFD 6 March 10, 2020 10:28
multiphaseEulerFoam/tank discharge ves OpenFOAM Running, Solving & CFD 8 December 31, 2017 15:59
Divergent temperature in chtMultiRegion(Simple)Foam akrasemann OpenFOAM Running, Solving & CFD 13 March 24, 2014 03:54
Compilation error OF1.5-dev on Suse10.3 darenyang OpenFOAM Installation 0 April 29, 2009 05:55


All times are GMT -4. The time now is 06:34.