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

Failed wmake when using scalaCodedSource in fvOptions

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2020, 04:18
Default Failed wmake when using scalaCodedSource in fvOptions
  #1
New Member
 
Unn
Join Date: Aug 2020
Posts: 1
Rep Power: 0
napattorn is on a distinguished road
Hi all,

I am currently struggling with setting up coded source via fvOptions. I have looked at previous discussions on this forum about this and used them as guideline, for instance, in creating the following momentum source term:

Code:
momentumSource
{
    type            vectorCodedSource;
    active          on;
    name    sourceTime;    
    vectorCodedSourceCoeffs
    {
    fields  (U);

    selectionMode   all

    redirectType  sourceTime; 
    
    codeInclude
    #{

    #};
        
    codeCorrect
    #{
        Pout<< "**codeCorrect**" << endl;
    #};
    
        codeAddSup
    #{
        const scalarField& V = mesh_.V();
        vectorField& USource = eqn.source();
        USource += (100 1 1)*V; // Definition of the user-defined momentum source term
    #};
        
    codeSetValue
    #{
        Pout<< "**codeSetValue**" << endl;
    #};
        
    // Dummy entry. Make dependent on above to trigger recompilation
    code
    #{
        $codeInclude
        $codeCorrect
        $codeAddSup
        $codeSetValue
    #};
    }
    
    sourceTimeCoeffs
    {
    // Dummy entry
    }
  
}
However, when I run the simulation, the following error message pops up:

Code:
Invoking "wmake -s libso /home/user/CFDEM/user-PUBLIC-5.x/run/Original/CFD/dynamicCode/heatSink"
sh: 1: Syntax error: "(" unexpected
[0] 
[0] 
[0] --> FOAM FATAL IO ERROR: 
[0] Failed wmake "dynamicCode/heatSink/platforms/linux64GccDPInt32Opt/lib/libheatSink_7946a6c1177d969821ce64c8d265d148e8176c3e.so"
[0] 
[0] 
[0] file: /home/user/CFDEM/user-PUBLIC-5.x/run/Original//CFD/constant/scalarTransportProperties.generalManualProps.fvOptionsT.scalarCodedSourceCoeffs from line 67 to line 101.
[0] 
[0]     From function void Foam::codedBase::createLibrary(Foam::dynamicCode&, const Foam::dynamicCodeContext&) const
[0]     in file db/dynamicLibrary/codedBase/codedBase.C at line 206.
[0] 
FOAM parallel run exiting
[0]
I also counter this error when I create similar field for scalarCodedSource. I looked up this error online but none seems relevant to my case.

Could any experienced users provide insights into this issue?

Thank you very much.

PS. I'm running a CFD-DEM simulation using CFDEM project - I'm not sure if this has anything to do with the error, but from my understanding fvOptions is initiated independent of the coupling.
napattorn is offline   Reply With Quote

Reply

Tags
fvoptions

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Foam::error::printStack(Foam::Ostream&) with simpleFoam -parallel U.Golling OpenFOAM Running, Solving & CFD 52 September 23, 2023 03:35
Problems Installing OF 1.6 32 bit bucksfan OpenFOAM Installation 19 August 4, 2009 01:36
user subroutine error CFDUSER CFX 2 December 9, 2006 06:31
[OpenFOAM] ParaFoam error message joey ParaView 1 October 2, 2006 13:28
user defined function cfduser CFX 0 April 29, 2006 10:58


All times are GMT -4. The time now is 20:57.