|
[Sponsors] |
Problems creating a volScalarField with expressionField function-object |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 18, 2014, 11:12 |
Problems creating a volScalarField with expressionField function-object
|
#1 |
Senior Member
Alex
Join Date: Oct 2013
Posts: 337
Rep Power: 21 |
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; } 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 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! |
|
Tags |
expressionfield, function object, funkysetfields, groovybc, swak4foam |
|
|
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 |