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

volScalarField, initialization

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 24, 2010, 22:33
Default volScalarField, initialization
  #1
New Member
 
Nadeem
Join Date: Mar 2009
Location: München, Bavarian, Deutschland
Posts: 24
Rep Power: 17
ubaid is on a distinguished road
Hello Everybody,

I am struggling to initialize volScalarField with internalField and also with path values.

I found out following structure.

volScalarFial A
{
IOobject("A",runTime.timeName(),mesh,IOobject::NO_ READ,IOobject::NO_WRITE),
mesh,
dimensionedScalar("A",A.dim, xyz)
}

I am not getting what is this xyz, I think its internal field.
and to initialize this field by its patch values i did following
forAll(A.boundaryField(),patchi)
{
A.boundaryField()[patchi] = 300;
}
in this way, 300 gets assigned to the whole boundary patches. when I write it in openfoam, then I get xyz in internal field and 300 at the patches, its right, BUT, when this field is used in a solver that is built in code, and this field is first of all initialized as above mentioned method then it does not give same results as I read in this Field inside the code.

I think there is a problem with internal field. Can anyone give me some suggestions?

What i want, is to initialize the fields in my code and want to use these fields inside the solver that is also built in my code, in order to save read and write time consumption.

Thanks in advance.

BEst Regards,
ubaid is offline   Reply With Quote

Old   October 27, 2010, 00:00
Default
  #2
Senior Member
 
santiagomarquezd's Avatar
 
Santiago Marquez Damian
Join Date: Aug 2009
Location: Santa Fe, Santa Fe, Argentina
Posts: 452
Rep Power: 24
santiagomarquezd will become famous soon enough
Hello ubaid!!

Can you post a more extense portion of your code? Maybe some includes are overwriting your hard-coded initialization.

Regards.
__________________
Santiago MÁRQUEZ DAMIÁN, Ph.D.
Research Scientist
Research Center for Computational Methods (CIMEC) - CONICET/UNL
Tel: 54-342-4511594 Int. 7032
Colectora Ruta Nac. 168 / Paraje El Pozo
(3000) Santa Fe - Argentina.
http://www.cimec.org.ar
santiagomarquezd is offline   Reply With Quote

Reply

Tags
field, volscalarfield


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
How to create initiate a volScalarField p without reading from disk NO_READ does not seem to work dbxmcf OpenFOAM Running, Solving & CFD 14 March 25, 2022 07:08
if-loop, volScalarField comparison volker OpenFOAM 7 March 6, 2020 21:03
Problems with creating a volScalarField georlade OpenFOAM Programming & Development 4 December 4, 2016 13:31
FMG initialization query Mohsin FLUENT 6 November 2, 2016 03:02
compressor initialization paglia FLUENT 0 February 1, 2006 16:14


All times are GMT -4. The time now is 16:03.