|
[Sponsors] |
December 11, 2014, 06:35 |
Add value to a Foam::volScalarField list
|
#1 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
Hello
Is it possible to add a new value to an existing Foam::volScalarField nonuniform List<scalar>? I have seen that a push_back() member exists for vectors in C++, but have not found a similiar member for volScalarField and I'm looking for something similar. If this is not possible, I will have to rewrite the variable in question file for each time step, but this is computationally expensive. For example: Pressure is created in createFields.H and is Code:
p: dimensions [1 -1 -2 0 0 0 0]; internalField nonuniform List<scalar> 32 ( 10006.5 10010.5 10010.5 10009.3 10010.5 10012.3 10012.3 10012.3 10010.5 10012.3 10012.3 10012.3 10006.5 10010.5 10010.5 10009.3 99775.3 99545.7 99545.7 99676.7 99545.7 99419.7 99419.7 99469.8 99545.7 99419.7 99419.7 99469.8 99775.3 99545.7 99545.7 99676.7 ) ; boundaryField { grain { type zeroGradient; } walls { type zeroGradient; } defaultFaces { type empty; } } Thanks in advance |
|
December 11, 2014, 07:12 |
|
#3 |
Member
Join Date: Jul 2014
Posts: 39
Rep Power: 12 |
Thank you Alexey
Just something else out of curiosity. Have you seen anyone adding cells in a solver to the blockMesh. I am able to add new cells now in my solver, so now I just need to set the new cell variables. Hopefully it will not end up in total disaster. |
|
December 11, 2014, 08:14 |
|
#4 |
Senior Member
|
Hi,
Yes, I've seen several people. Though they were adding cells to dynamicFvMesh not to blockMesh. |
|
Tags |
add value, volscalarfield list |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] funkyDoCalc with OF2.3 massflow | NiFl | OpenFOAM Community Contributions | 14 | November 25, 2020 04:30 |
[PyFoam] and paraview | eelcovv | OpenFOAM Community Contributions | 28 | May 30, 2016 10:23 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
[swak4Foam] build problem swak4Foam OF 2.2.0 | mcathela | OpenFOAM Community Contributions | 14 | April 23, 2013 14:59 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |