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

cyclicTemperatureFoam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2021, 14:43
Default cyclicTemperatureFoam
  #1
Member
 
Sai Guruprasad Jakkala
Join Date: Jan 2017
Posts: 34
Rep Power: 9
saiguruprasad is on a distinguished road
I am trying to use the cyclicTemperatureFoam developed by Jakob for my problem. I downloaded the file from here.

I am using OpenFOAM-v1912 for my simulations. I downloaded the solver and finished compiling it. I tried to run a sample case and an error occurs
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : _f3950763fe-20191219 OPENFOAM=1912
Arch   : "LSB;label=64;scalar=64"
Exec   : cyclicTemperatureFoam
Date   : Mar 29 2021
Time   : 13:36:19
Host   : linux
PID    : 10616
I/O    : uncollated
Case   : /OpenFOAM/run/cyclic_temp_trial
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p

AMI: Creating addressing and weights between 373 source faces and 373 target faces
AMI: Patch source sum(weights) min:1 max:1 average:1
AMI: Patch target sum(weights) min:1 max:1 average:1
AMI: Creating addressing and weights between 1088 source faces and 1222 target faces
AMI: Patch source sum(weights) min:0.776249 max:1.09651 average:0.99923
AMI: Patch target sum(weights) min:0.808243 max:1 average:0.999577
Reading field U

Reading field T

Reading transportProperties

Reading/calculating face flux field phi

--> FOAM FATAL IO ERROR: 
Wrong token type - expected word, found on line 22: double 0.84499

file: 
/OpenFOAM/run/cyclic_temp_trial/constant/transportProperties.Pr at line 22.

    From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::word&)
    in file primitives/strings/word/wordIO.C at line 78.

FOAM exiting
I believe that the error can be because of compiling for different versions and definitions in the code could have changed. I would like to know what changes I need to make to make it work in OpenFOAM-v1912.
saiguruprasad is offline   Reply With Quote

Old   March 29, 2021, 14:53
Default Solution
  #2
Member
 
Sai Guruprasad Jakkala
Join Date: Jan 2017
Posts: 34
Rep Power: 9
saiguruprasad is on a distinguished road
Solved it. The entries in the transportProperties need to be mentioned twice. I have attached the transportProperties file for clarity.

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      transportProperties;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

transportModel Newtonian;

// Laminar viscosity
nu              3.22118e-05;
Pr Pr [0 0 0 0 0 0 0]  0.84499;

// Thermal expansion coefficient
beta            2.4659e-03;
gamma gamma [0 -1 0 1 0 0 0]       0.01;

// Reference temperature
//TRef            573;
Twall Twall [0 0 0 1 0 0 0]            573;
Lc Lc [0 1 0 0 0 0 0]            3.45e-3;
//rhoRef            239.25;

// Laminar Prandtl number
//Pr  0.84499;

// Turbulent Prandtl number
Prt Prt [0 0 0 0 0 0 0]     0.85;

// ************************************************************************* //
saiguruprasad is offline   Reply With Quote

Old   March 29, 2021, 15:00
Default Error while running
  #3
Member
 
Sai Guruprasad Jakkala
Join Date: Jan 2017
Posts: 34
Rep Power: 9
saiguruprasad is on a distinguished road
I tried to run the simulation using cyclicTemperatureFoam and it ended in error after solving for the T equation. The error was:
Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1912                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : _f3950763fe-20191219 OPENFOAM=1912
Arch   : "LSB;label=64;scalar=64"
Exec   : cyclicTemperatureFoam
Date   : Mar 29 2021
Time   : 13:57:58
Host   : linux
PID    : 12334
I/O    : uncollated
Case   : /OpenFOAM/run/cyclic_temp_trial
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p

AMI: Creating addressing and weights between 373 source faces and 373 target faces
AMI: Patch source sum(weights) min:1 max:1 average:1
AMI: Patch target sum(weights) min:1 max:1 average:1
AMI: Creating addressing and weights between 1088 source faces and 1222 target faces
AMI: Patch source sum(weights) min:0.776249 max:1.09651 average:0.99923
AMI: Patch target sum(weights) min:0.808243 max:1 average:0.999577
Reading field U

Reading field T

Reading transportProperties

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present

Creating finite volume options from "constant/fvOptions"

Selecting finite volume options type meanVelocityForce
    Source: momentumSource
    - selecting all cells
    - selected 526456 cell(s) with volume 9.06003e-08
    Initial pressure gradient = 0


Starting time loop

Courant Number mean: 0.117542 max: 4.13153
Time = 5e-07

PIMPLE: iteration 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.00883685, No Iterations 9
time step continuity errors : sum local = 2.55973e-05, global = -7.47222e-07, cumulative = -7.47222e-07
Pressure gradient source: uncorrected Ubar = 6.59483, pressure gradient = 5.52406e+06
GAMG:  Solving for p, Initial residual = 0.787111, Final residual = 9.231e-09, No Iterations 37
time step continuity errors : sum local = 3.56132e-07, global = -3.55975e-07, cumulative = -1.1032e-06
Pressure gradient source: uncorrected Ubar = 6.76869, pressure gradient = 5.12475e+06
DILUPBiCGStab:  Solving for T, Initial residual = 1, Final residual = 2.46586e-09, No Iterations 4
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2  ? in /lib64/libc.so.6
#3  ? at cyclicTemperatureFoam.C:?
#4  ? at ??:?
#5  __libc_start_main in /lib64/libc.so.6
#6  ? at ??:?
Segmentation fault (core dumped)
Anyone has an idea, why this error comes up?
saiguruprasad is offline   Reply With Quote

Old   March 29, 2021, 22:38
Default Solution to the sigSegv
  #4
Member
 
Sai Guruprasad Jakkala
Join Date: Jan 2017
Posts: 34
Rep Power: 9
saiguruprasad is on a distinguished road
The patches in the Nu.H of the solver needs to be changed to avoid the error.

In the original file, the patches mentioned were 'walls' and 'inlet'. I changed it to the respective ones from my mesh and the code was running without errors.
saiguruprasad is offline   Reply With Quote

Reply

Tags
cyclic heat transfer, openfoam


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



All times are GMT -4. The time now is 12:18.