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

making a coded files

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 13, 2023, 10:56
Default making a coded files
  #1
New Member
 
Turhan
Join Date: Sep 2022
Posts: 16
Rep Power: 4
Turhan is on a distinguished road
Dear all,

Through a coded file I will try to multiple the volume flow with the sediment fraction. This way I can calculate the volume flow of the sediment through the outlet.

What I currently have is this:
Code:
compute_SedVolumeFlow       {
            libs        ("libutilityFunctionObjects.so");
            
            type coded;
            name compute_SedVolumeFlow;
            outputControl writeTime;
            
            codeWrite
            #{
                  label patchID = mesh().boundaryMesh().findPatchID("outlet");
                  const volScalarField& phi = mesh().lookupObject<volScalarField>("phi");
                  const volScalarField& alpha = mesh().lookupObject<volScalarField>("alpha.sludge");
                  volScalarField SedVolumeFlow = phi*alpha;
                  SedVolumeFlow.write();
            #};
       }
However, I don't see the output value "SedVolumeFlow" anywhere. I wondered what possibly could be wrong with the code and where should I find this output variable?
Turhan is offline   Reply With Quote

Reply

Tags
codedfunctionobject, libutilityfunctionobjects, postprocess function


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
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 17:05
[swak4Foam] Installation Problem with OF 6 version Aurel OpenFOAM Community Contributions 14 November 18, 2020 17:18
UDF issue MASOUD Fluent UDF and Scheme Programming 14 December 6, 2012 14:39
critical error during installation of openfoam Fabio88 OpenFOAM Installation 21 June 2, 2010 04:01
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24


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