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

Unknown variable 'WM_OPTIONS'

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 4, 2021, 20:04
Default Unknown variable 'WM_OPTIONS'
  #1
Member
 
Jonathan Wells
Join Date: Oct 2020
Location: Indiana
Posts: 44
Rep Power: 5
jdw135 is on a distinguished road
Hi,

I am currently trying to add an fvOptions source to my rhoPimpleFoam case, and I am receiving the following error:

Code:
--> FOAM FATAL ERROR:
[7] Unknown variable 'WM_OPTIONS'
[7]
[7]
[7]     From Foam::string Foam::getVariable(const Foam::word &, const Foam::dictionary *, bool, bool, bool)
[7]     in file primitives/strings/stringOps/stringOps.C at line 443.
[7]
FOAM parallel run exiting
Is this an issue with something I've done in the code, or is it a problem with something else? It seems like WM_OPTIONS is an environment variable, so I'm not sure why this is happening. My fvOptions code is below:

Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      fvOptions;
}

energySource
    {
        type            scalarCodedSource;
        name            sourceTime;
        selectionMode   all;
        fields          (h);

        active          yes;

        codeAddSup
        #{
            const Time& time = mesh().time();
            const volScalarField& rhoS = mesh_.lookupObject<volScalarField>("rho");
            const volVectorField& uS = mesh_.lookupObject<volVectorField>("U");
            const volScalarField& pS = mesh_.lookupObject<volScalarField>("p");
            const vectorField& C = mesh_.C();
            const scalarField& V = mesh_.V();
            scalarField& SoS = sqrt(1.4*(pS/rhoS));
            scalarField& mach = uS/SoS;
            scalarField& rhoQ = (pS*(1-(mach*mach))1005)/(1.4*(mach*mach)*287.058);
            scalarField& qq = eqn.source();

            // Apply the source
            forAll(C,i)
            {
                 qq -= rhoQ;
            };
        #};

        codeCorrect
        #{
            Pout<< "**codeCorrect**" << endl;
        #};

        codeConstrain
        #{
            Pout<< "**codeConstrain**" << endl;
        #};

    }
jdw135 is offline   Reply With Quote

Reply


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
[Commercial meshers] fluent3DMeshToFoam bego OpenFOAM Meshing & Mesh Conversion 31 August 16, 2023 09:04
Kiva 3v - Fortran Error alexoem Main CFD Forum 6 October 4, 2017 10:50
FDS error Mark JIN Main CFD Forum 0 February 17, 2017 05:49
dsmcInitialise - dsmcFoam archymedes OpenFOAM Pre-Processing 94 July 15, 2016 16:14
[OpenFOAM] Xwindows crash with paraview save srinath ParaView 1 October 15, 2008 09:37


All times are GMT -4. The time now is 01:25.