|
[Sponsors] |
How to modify psi value from the solver level (based on reactingFoam)? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 21, 2012, 15:05 |
How to modify psi value from the solver level (based on reactingFoam)?
|
#1 |
New Member
|
Hello everyone,
I am writing a solver based on reactingFoam (1.7.1). The psi value is calculated from a user-routine, and I want to assign the value to psi and use that psi to update other thermo properties. However, in the basicThermo class, the psi is defined as const... I tried to add non-const access to psi, and there is no compilation error, but there is runtime error related to psi.oldtime(). Is there any way that I could update the psi value as well as alpha and mu from a solver level? Thanks a lot, Xinyu |
|
March 31, 2017, 00:33 |
|
#2 |
Senior Member
Freedom
Join Date: May 2014
Posts: 209
Rep Power: 13 |
Yes, there is. First find the "psi" object using the "lookupObject" function, and use const_cast to convert it non-constant filed.
Best, Xu |
|
Tags |
reactingfoam, thermo library |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure based and Density based Solver | Xobile | Main CFD Forum | 39 | August 19, 2020 07:04 |
Pressure Based Coupled Solver | A.S. | Main CFD Forum | 1 | November 8, 2015 10:59 |
adding radiation to reactingFoam solver | Marshak | OpenFOAM | 1 | February 13, 2012 06:43 |
Regarding Density based solver | Eswar | Main CFD Forum | 2 | June 6, 2007 12:00 |
Density based solver | Eswar | Main CFD Forum | 2 | May 29, 2007 08:29 |