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

Bizarre behavior of passing a scalarField to another scalarField

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2020, 19:08
Default Bizarre behavior of passing a scalarField to another scalarField
  #1
Senior Member
 
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 10
randolph is on a distinguished road
Hi,

I run into some bizarre behavior of passing a scalarField to another scalarField and I can not explain.

I was try to simply pass a scalarField of Y_pre to scalarField of Y. Initially, I just use

Code:
Y = Y_pre
But this does not correctly pass the value to Y. I end up with this following solution.

Code:
forAll(Y,celli)
{
    Y[celli] = Y_pre[celli];
}
My question is what is the difference between these two method? For additional information, there is a YEqn following right after these two different operation.

Thank advance for any insight.

Rdf
randolph 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
[openSmoke] libOpenSMOKE Tobi OpenFOAM Community Contributions 562 January 25, 2023 09:21
CFD by anderson, chp 10.... supersonic flow over flat plate varunjain89 Main CFD Forum 18 May 11, 2018 07:31
Passing ScalarField from OpenFoam to Fortran IvanaS OpenFOAM 5 April 19, 2013 09:32


All times are GMT -4. The time now is 00:49.