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

Problems with the execution of the setFields utility.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2011, 11:34
Default Problems with the execution of the setFields utility.
  #1
Member
 
Alexander
Join Date: Jul 2011
Posts: 38
Rep Power: 15
foamer is on a distinguished road
Hi

I have problems with the execution of the setFields utility in the shocktube tutorial. (i have the same problem in the dambreak tutorial. For this one, i have consulted the OpenFOAM guide, but gets the same error message as in the shocktube tutorial).

After i have executed setFields, i get the following error message for the shocktube:


Usage: setFields [-latestTime] [-time ranges] [-parallel] [-constant] [-noZero] [-case dir] [-help] [-doc] [-srcDoc]



--> FOAM FATAL ERROR:
Wrong number of arguments, expected 0 found 2


FOAM exiting



The setFieldsDict file looks like:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues ( volVectorFieldValue U ( 0 0 0 ) volScalarFieldValue T 348.432 volScalarFieldValue p 100000 );

regions ( boxToCell { box ( 0 -1 -1 ) ( 5 1 1 ) ; fieldValues ( volScalarFieldValue T 278.746 volScalarFieldValue p 10000 ) ; } );


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


I am looking for a detailed step by step solution for this problem.

From my point of view, it sounds like it is very straight forward to execute the setFields utility , but obviously not, i can not manage it. I am not good in openFoam programming nor experienced in this software.

Any help is deeply appreciated

Alex
foamer is offline   Reply With Quote

Old   November 2, 2011, 12:15
Default
  #2
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
Take a look at the error. It says you called setFields wrong. If you are setting the fields in your 0 directory (assuming it exists and all the field files are there). You should need no arguments for setFields. Just run `setFields` and you are golden.
-Kent
kwardle is offline   Reply With Quote

Old   November 9, 2011, 06:27
Default
  #3
Member
 
Alexander
Join Date: Jul 2011
Posts: 38
Rep Power: 15
foamer is on a distinguished road
Thank`s Kent

I found that is was enough to spell the "setFields" command and not "setFields . shocktube" :P

Its running now.
foamer is offline   Reply With Quote

Old   June 3, 2013, 10:42
Default
  #4
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Dear,
is it possible to impose a Temerature with setFields for a while?

For example I d like to ignite a mixture in reactingFoam by setting up a temperature field, after a few diffusion has occured, and maintain the temperature a few time steps such that the mixture ignite.

Thanks

Cam
camille131 is offline   Reply With Quote

Old   June 3, 2013, 12:57
Default
  #5
Senior Member
 
Kent Wardle
Join Date: Mar 2009
Location: Illinois, USA
Posts: 219
Rep Power: 21
kwardle is on a distinguished road
Nope, not with setFields---it is used only for setting the initial condition on your fields. I suppose you could run it for "a while" and then reinitialize the temperature with setFields at the latestTime, but I don't think that is what you are going for. There are other ways to do what you ask and other threads in the forum which discuss this.
kwardle is offline   Reply With Quote

Old   June 3, 2013, 13:24
Default
  #6
Member
 
Camille
Join Date: Oct 2012
Posts: 54
Rep Power: 14
camille131 is on a distinguished road
Well thank you for your response :-)

Do you know what should be the length and height of a patch tu simulate a spark? (my chamber is 40 cm long and has a diameter of 28 cm) .
I m trying different scales but it s not easy to find the right one.. at the beginning (at t=0.05) I put the T set at 810 K and it rises till 2300 K .

That seems ok for premixed CH4 combustion at stoechiometry. But the CH4 flow semms interrupted..
camille131 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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 12:12
Execution problems in dsmcFOAM turanc OpenFOAM Running, Solving & CFD 3 April 10, 2017 13:58
Sample Utility not working in OpenFoam 1.6 titio OpenFOAM Post-Processing 6 November 15, 2014 19:04
Sample utility problems msrinath80 OpenFOAM Running, Solving & CFD 12 December 21, 2012 06:51
[Commercial meshers] Several problems with the mesh conversion utility when converting the meshes from Gridgen su_junwei OpenFOAM Meshing & Mesh Conversion 2 July 27, 2008 00:58


All times are GMT -4. The time now is 13:11.