|
[Sponsors] |
An array to store scalar value at every time step |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 12, 2023, 03:09 |
An array to store scalar value at every time step
|
#1 |
New Member
Parth
Join Date: Feb 2021
Posts: 14
Rep Power: 5 |
Hi
i am new to OpenFOAM i am trying to compile a solver, in which i need to store the the instantaneous calculated variable (scalar) to array for every time step I mean CF_spatial = gsum(V_ecs)/gsum(por) V_ecs and por are time dependent field variables, but CF_spatial is calculated at every time step and is a scalar value and it is not a field variable, i want to create an array where i can store CF_spatial value at every time step, pls help |
|
February 12, 2023, 16:20 |
|
#2 | |
Member
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4 |
Quote:
When you know the size, then why not using C++ arrays (or OpenFoam class List<T>), otherwise you could use vector from the standard library (std::vectory<T>) and then use the push_back() method. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
courant number increases to rather large values | 6863523 | OpenFOAM Running, Solving & CFD | 22 | July 5, 2023 23:48 |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 02:36 |
Postprocess: sampleDict works but creates no output folder | shock77 | OpenFOAM Post-Processing | 14 | November 15, 2021 08:27 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 04:13 |
SU2 7.0.7 Built on CentOS 7, parallel computation pyscript mpi exit error? | EternalSeekerX | SU2 | 3 | October 9, 2020 18:28 |