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

setFieldDict

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 26, 2012, 04:55
Default setFieldDict
  #1
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
Dear all,

I have found this dictionary, setFieldDict, and I am finding it very useful.

I have this dictionary for my case:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      setFieldsDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
    volScalarFieldValue T 278
);

regions
(
    // Set patch values (using ==)
    zoneToCell
    {
        name air_infinite;

        fieldValues
        (
            volScalarFieldValue T 298
        );
    }
);

// ************************************************************************* //
What I would like to know is if the temperature in the air_infinite zone will remain constant (T = 298) during the whole simulation.

Thanks a lot,

Samuele
samiam1000 is offline   Reply With Quote

Old   March 26, 2012, 09:20
Default
  #2
Disabled
 
Join Date: Mar 2011
Posts: 174
Rep Power: 15
anon_a is on a distinguished road
Quote:
What I would like to know is if the temperature in the air_infinite zone will remain constant (T = 298) during the whole simulation.
Well, you will have to do the simulation to check that! :-p
In the general case no, that's just an initial condition.
anon_a is offline   Reply With Quote

Old   March 26, 2012, 09:24
Default
  #3
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
Code:
Well, you will have to do the simulation to check that! :-p
That's what I did ..

I asked in order to avoid the simulation.. Anyway, do you know how to impse a certain value (let's say temperature) in a volume during the whole simulation??
samiam1000 is offline   Reply With Quote

Old   March 26, 2012, 10:10
Default
  #4
Disabled
 
Join Date: Mar 2011
Posts: 174
Rep Power: 15
anon_a is on a distinguished road
You can check some previous posts for that:

http://www.cfd-online.com/Forums/ope...-solution.html
http://www.cfd-online.com/Forums/ope...lculation.html
http://www.cfd-online.com/Forums/ope...ll-solver.html

I am afraid that it is not done easily with some tool, you will have to play with the code.
anon_a is offline   Reply With Quote

Old   March 26, 2012, 10:17
Default
  #5
Senior Member
 
Samuele Z
Join Date: Oct 2009
Location: Mozzate - Co - Italy
Posts: 520
Rep Power: 19
samiam1000 is on a distinguished road
Thanks a lot.

Actually, I did it for buoyantSimpleFoam, but I am getting a strange errore with buoyantPimpleFoam.

I'm trying again and again! Hope to solve it!

Thanks again,

Samuele.
samiam1000 is offline   Reply With Quote

Old   March 3, 2017, 02:28
Default setFielddict
  #6
New Member
 
sudhakar singh
Join Date: Jun 2016
Posts: 12
Rep Power: 10
Sud09463 is on a distinguished road
hello,
I am using following setFieldDict for my case:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.1.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
volScalarFieldValue alpha1 0
);

regions
(
cylinderToCell
{
p1 (0 0 0);

p2 (0 0 70e-3);

radius 2.285-3;

fieldValues
(
volVectorFieldValue U (0 0 107)

volScalarFieldValue f 1;
);
}
);


// ************************************************** *********************** //

I want to know that what is the meaning of this Dict file? fieldValues that i am assigning will be imposed to which face of the cylinder? whether at face having point P1 or face having point P2?

I am not able to understand this. Can anybody help me?
Sud09463 is offline   Reply With Quote

Old   March 3, 2017, 03:58
Default
  #7
Senior Member
 
floquation's Avatar
 
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21
floquation will become famous soon enough
Please use [code]-tags to show code. Otherwise you lose alignment/indentation which makes it nasty to read...

It is volumetric:
All cells within the cylinder with axis \vec{p}_2-\vec{p}_1 (and therefore both its height and position are defined) and radius "radius", are selected. Then the specified values for U and f are applied as initial condition to those cells.
floquation 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



All times are GMT -4. The time now is 12:33.