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

coded - error - OpenFOAM 11

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 18, 2024, 15:35
Default coded - error - OpenFOAM 11
  #1
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Hi,


I created the code below and managed to compile it successfully in OpenFOAM 11. However, there is no result coming out, the directories are being generated, but the information about the face normals is not being written. What could I be doing wrong? I actually only want the normal on the wall faces.


Code:
computeNormals
{
    libs ("libutilityFunctionObjects.so");
    type coded; 
    redirectType    computeNormals; 
    writeControl    timeStep; //outputTime; 
    //writeInterval   0.2;
    
    code 
    #{
        //const surfaceVectorField& normals = mesh().Sf();
        //normals.write();
        
        //const vectorField& Sfp = mesh_.Sf().boundaryField()[patchi];
        //const scalarField& magSfp = mesh_.magSf().boundaryField()[patchi];
        
        const vectorField& Sfp = mesh().Sf();
        const scalarField& magSfp = mesh().magSf();
        
        Sfp.write();
        magSfp.write();        
    #};
}

The function (computeNormals) is included in the controlDict.


Thanks
gu1 is offline   Reply With Quote

Old   October 20, 2024, 13:22
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 18
dlahaye is on a distinguished road
Not sure.

Is specifying a writeInterval (now commented in the code) required here? Do you need to overwrite the default setting? Or do you specify the writeInterval elsewhere?
dlahaye is offline   Reply With Quote

Old   October 20, 2024, 17:12
Default
  #3
gu1
Senior Member
 
Guilherme
Join Date: Apr 2017
Posts: 245
Rep Power: 10
gu1 is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
Not sure.

Is specifying a writeInterval (now commented in the code) required here? Do you need to overwrite the default setting? Or do you specify the writeInterval elsewhere?
I didn't specify it anywhere else...
Is that why you're not writing? I don't think so.
gu1 is offline   Reply With Quote

Reply

Tags
coded, coded function object, openfoam11


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
coded functionObjects behaving not as expected alexfells OpenFOAM 2 October 28, 2020 04:58
Coded function object in openfoam v5 kit607 OpenFOAM Post-Processing 3 September 29, 2020 16:43
Unknown character in name of output variable when using coded function object pvergnol OpenFOAM Post-Processing 5 August 12, 2020 14:29
codeInclude in coded function in controlDict, and yPlus LuisAlberto OpenFOAM Programming & Development 4 August 18, 2015 13:48
coded function object and field average matthias OpenFOAM Post-Processing 3 June 30, 2014 05:52


All times are GMT -4. The time now is 18:09.