|
[Sponsors] |
Error when compiling custom solver for an arc flash simulation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 11, 2024, 09:43 |
Error when compiling custom solver for an arc flash simulation
|
#1 |
New Member
Gerald
Join Date: Jun 2024
Posts: 1
Rep Power: 0 |
Hello all!
I am trying to simulate the pressure distribution in a room due to an arc flash using a custom solver I am modifying from rhoCentralFoam. I am treating the arc flash as a heat source and want to add the energy released as a source term Q, where Q=kp*Warc. I added this in the createFields.H file: Code:
IOdictionary arcProperties ( IOobject ( "arcProperties", runTime.constant(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); dimensionedScalar kp ( "kp", dimless, arcProperties.lookup("kp"), ); dimensionedScalar Warc ( "kp", dimEnergy, arcProperties.lookup("Warc"), ); volScalarField Q ( IOobject ( "Q", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), kp*Warc, ); Code:
Making dependencies: AFRhoCentralFoam.C g++ -std=c++14 -m64 -pthread -DOPENFOAM=2406 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -Wno-unknown-pragmas -O3 -DNoRepository -ftemplate-depth-100 -IBCs/lnInclude -I/usr/lib/openfoam/openfoam2406/src/finiteVolume/lnInclude -I/usr/lib/openfoam/openfoam2406/src/meshTools/lnInclude -I/usr/lib/openfoam/openfoam2406/src/transportModels/compressible/lnInclude -I/usr/lib/openfoam/openfoam2406/src/thermophysicalModels/basic/lnInclude -I/usr/lib/openfoam/openfoam2406/src/thermophysicalModels/specie/lnInclude -I/usr/lib/openfoam/openfoam2406/src/TurbulenceModels/turbulenceModels/lnInclude -I/usr/lib/openfoam/openfoam2406/src/TurbulenceModels/compressible/lnInclude -I/usr/lib/openfoam/openfoam2406/src/dynamicFvMesh/lnInclude -iquote. -IlnInclude -I/usr/lib/openfoam/openfoam2406/src/OpenFOAM/lnInclude -I/usr/lib/openfoam/openfoam2406/src/OSspecific/POSIX/lnInclude -fPIC -c AFRhoCentralFoam.C -o Make/linux64GccDPInt32Opt/AFRhoCentralFoam.o In file included from /usr/lib/openfoam/openfoam2406/src/OpenFOAM/lnInclude/postProcess.H:147, from AFRhoCentralFoam.C:61: ./createFields.H: In function int main(int, char**): ./createFields.H:121:1: error: expected primary-expression before ) token 121 | ); | ^ ./createFields.H:128:1: error: expected primary-expression before ) token 128 | ); | ^ ./createFields.H:141:1: error: expected primary-expression before ) token 141 | ); | ^ In file included from AFRhoCentralFoam.C:67: createFields.H:121:1: error: expected primary-expression before ) token 121 | ); | ^ createFields.H:128:1: error: expected primary-expression before ) token 128 | ); | ^ createFields.H:141:1: error: expected primary-expression before ) token 141 | ); | ^ make: *** [/usr/lib/openfoam/openfoam2406/wmake/rules/General/transform:38: Make/linux64GccDPInt32Opt/AFRhoCentralFoam.o] Error 1 |
|
Today, 06:02 |
|
#2 |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40 |
Why do you have a trailing comma after each of the last parameters? This is not good.
|
|
Tags |
heat source term, rhocentralfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Divergence detected in AMG solver. VOF. | Mr.Mister | Fluent Multiphase | 5 | November 22, 2024 07:32 |
CPUs vs GPUs for CFD? | hami11 | Hardware | 22 | July 23, 2024 16:59 |
viscosity udf don't use correct temperature and strain rate | rezvani | Fluent UDF and Scheme Programming | 8 | May 27, 2021 06:40 |
[blockMesh] Meshing a circle in a square | ChasingNeutrons | OpenFOAM Meshing & Mesh Conversion | 6 | October 11, 2016 21:42 |
settlingFoam unstable? | bendel_boy | OpenFOAM Running, Solving & CFD | 38 | July 8, 2016 06:07 |