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

CodedFixedValue

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 22, 2021, 09:37
Default CodedFixedValue
  #1
New Member
 
Zhang Yan
Join Date: Nov 2021
Posts: 15
Rep Power: 4
Erikaaa is on a distinguished road
Hello! FOAMers,

I am using the boundary function CodedFixedValue in icoFoam. The simulation works, but there is a problem when I am using paraFoam.

Version: openFOAM v8
Case: elbow.

Code:
boundaryField
{
    wall-4
    {
        type            noSlip;
    }

    velocity-inlet-5
    {
        //type            fixedValue;
        //value           uniform (1 0 0);
        type            codedFixedValue;
        value          $internalField;
        name          myPolynomialTemperature
        
        code
        #{
            scalar U_ave = 1;
            scalar h = 1.3;

            const fvPatch& boundaryPatch = this->patch();

            const vectorField& Cf = boundaryPatch.Cf();
            
            vectorField& field = *this;

            forAll(boundaryPatch, i)
            {
                field[i] = vector(U_ave*(1 - Foam::pow( Cf[i].y() / h, 2) ), 0, 0);
            }
        #};

        codeOptions
        #{
            -I$(LIB_SRC)/finiteVolume/lnInclude \
            -I$(LIB_SRC)/meshTools/lnInclude
        #};

        codeInclude
        #{
            #include "fvCFD.H"
            #include <cmath>
            #include <iostream>
        #};
    }

    velocity-inlet-6
    {
        type            fixedValue;
        value           uniform (0 3 0);
    }

    pressure-outlet-7
    {
        type            zeroGradient;
    }

    wall-8
    {
        type            noSlip;
    }

    frontAndBackPlanes
    {
        type            empty;
    }
}
command: paraFoam.

problem:
Code:
--> FOAM FATAL IO ERROR: 
Failed wmake "dynamicCode/myPolynomialTemperature/platforms/linux64GccDPInt32Opt/lib/libmyPolynomialTemperature_582e4eff53768672661639ab4caa2cd31b164fcf.so"


file: /home/cfd/OpenFOAM/cfd-8/run/tutorials/incompressible/icoFoam/elbow_quad_refined_codedVelocity/1/U/boundaryField/velocity-inlet-5 from line 8843 to line 8846.

    From function void Foam::codedBase::createLibrary(Foam::dynamicCode&, const Foam::dynamicCodeContext&) const
    in file db/dynamicLibrary/codedBase/codedBase.C at line 206.

FOAM exiting
I would be grateful if someone could answer me.
Erikaaa is offline   Reply With Quote

Old   August 18, 2022, 09:23
Default
  #2
rsa
New Member
 
Reza
Join Date: Jun 2012
Posts: 27
Rep Power: 13
rsa is on a distinguished road
Hi,


maybe too late to reply but could it be that you need to remove codeOptions & codeInclude?


/R
rsa is offline   Reply With Quote

Old   January 10, 2023, 03:40
Default
  #3
New Member
 
Osman Veysel Özdemir
Join Date: Jun 2022
Posts: 4
Rep Power: 3
ovozdemir is on a distinguished road
I am getting same error, did anyone solve this?
ovozdemir 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
including parameter file in codedFixedValue Loekatoni OpenFOAM Running, Solving & CFD 4 November 9, 2023 16:56
Syntax of codedFixedValue trailer OpenFOAM Running, Solving & CFD 1 July 24, 2021 06:17
[sedFoam] codedFixedValue does not transport alpha fields victor13165 OpenFOAM Running, Solving & CFD 0 July 13, 2021 09:30
codedFixedValue: accessing other patch causes crash in parallel RL-S OpenFOAM Running, Solving & CFD 2 December 24, 2019 21:20
Using codedFixedvalue to apply totalPressure Boundary Condition cdm OpenFOAM Running, Solving & CFD 2 June 22, 2013 14:10


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