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

Problems creating a volScalarField with expressionField function-object

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 18, 2014, 11:12
Default Problems creating a volScalarField with expressionField function-object
  #1
Senior Member
 
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21
zfaraday will become famous soon enough
Hi all,

Recently I have been trying to develop a boundary condition for convective heat transfer using swak4foam. For more information you can go to my last post regarding this problem (externalwallheatfluxtemperature-bc-h-function-twall). I'm still a bit lost about this matter, but, as a start, I tried to create a field named "hExtV" to define the convective heat transfer at the external wall (patch). To do so I have been reading all the documentation I have found about swak4foam.

Firstly, I tried to create the new field with funkySetFields. After it was executed a new file with the mentioned name was created in the coresponding region directory, as expected. After that, I tried to modify its value with the manipulatePachField function object, but an error appeared and I wasn't allowed to do that. Now I don't remember the error message, but I googled it and I found that executing the following function object it may be seen if the field was created successfully.

Code:
     listFields 
     {
         type listRegisteredObjects;
         region nameRegion;
     }
Obviously, the output of this FO in the log file didn't show the field created before with funkySetFields.

My second attempt was to create the field with the expressionField FO instead of funkySetFields. The field creation was successful as it can be seen in the output:
Code:
Creating expression field hExtV ... type:volScalarField
--> FOAM Warning : 
    From function simpleFunctionObject::simpleFunctionObject
    in file simpleFunctionObject/simpleFunctionObject.C at line 109
    'outputControlMode' not found in listFields
Assuming: timeStep
--> FOAM Warning : 
    From function simpleFunctionObject::simpleFunctionObject
    in file simpleFunctionObject/simpleFunctionObject.C at line 117
    'outputInterval' not found in listFields
Assuming: 1
Content of object registry <regionName> at start
                    Name             Type Autowrite
======================== ================ =========
                       T   volScalarField Yes
              betavSolid         IOobject No
                boundary polyBoundaryMesh No
               cellZones      regIOobject No
                    data         IOobject No
               faceZones      regIOobject No
                   faces         faceList No
               fvOptions         IOobject No
               fvSchemes       dictionary No
              fvSolution       dictionary No
                       h         IOobject No
                   hExtV         IOobject Yes
               neighbour        labelList No
                   owner        labelList No
                       p   volScalarField Yes
              pointZones      regIOobject No
                  points      vectorField No
     radiationProperties       dictionary No
            thermo:alpha         IOobject No
              thermo:rho         IOobject No
thermophysicalProperties       dictionary No
However, no field file is created in the corresponding region directory, so I cannot see the field values.

At this stage, I would like to know what I am doing wrong. What should I do in order to create the file in the region directory?

I attach the functions subdictionary specification so that you can see how I did it and the funkySetFields call I used.

Code:
functions
{

    hExtVExpression
    {
        type expressionField;
        outputControl timeStep;
        outputInterval 1;
        region <regionName>;
        fieldName hExtV;
        expression "0";
        dimension [1 0 -3 -1 0 0 0];
        autowrite true;
    }
     listFields 
     {
         type listRegisteredObjects;
         region <regionName>;;
     }
     hExtV_FO
     {
         type manipulatePatchField;
         outputControl timeStep;
         outputInterval 1;
         fieldName hExtV;
         region <regionName>;
         patchName conveccio_ext;
         expression "0.25*T";
         mask "true";
         writeManipulated true;
     }
Code:
funkySetFields -create -field hExtV -time 0 -expression '0'  -dimension '[1 0 -3 -1 0 0 0]'

Many thanks in advance!

Alex
__________________
Web site where I present my Master's Thesis: foamingtime.wordpress.com

The case I talk about in this site was solved with chtMultiRegionSimpleFoam solver and involves radiation. Some basic tutorials are also resolved step by step in the web. If you are interested in these matters, you are invited to come in!
zfaraday is offline   Reply With Quote

 

Tags
expressionfield, function object, funkysetfields, groovybc, swak4foam


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
[blockMesh] Errors during blockMesh meshing Madeleine P. Vincent OpenFOAM Meshing & Mesh Conversion 51 May 30, 2016 10:51
using chemkin JMDag2004 OpenFOAM Pre-Processing 2 March 8, 2016 22:38
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
Problems with Meshing: Collapsed Cells Emmanuel Resch Siemens 1 July 30, 2007 03:02
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


All times are GMT -4. The time now is 05:17.