|
[Sponsors] |
November 22, 2021, 09:37 |
CodedFixedValue
|
#1 |
New Member
Zhang Yan
Join Date: Nov 2021
Posts: 15
Rep Power: 4 |
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; } } 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 |
|
August 18, 2022, 09:23 |
|
#2 |
New Member
Reza
Join Date: Jun 2012
Posts: 27
Rep Power: 13 |
Hi,
maybe too late to reply but could it be that you need to remove codeOptions & codeInclude? /R |
|
January 10, 2023, 03:40 |
|
#3 |
New Member
Osman Veysel Özdemir
Join Date: Jun 2022
Posts: 4
Rep Power: 3 |
I am getting same error, did anyone solve this?
|
|
|
|
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 |