|
[Sponsors] |
February 10, 2021, 09:20 |
Assigning values to read-only location
|
#1 |
New Member
Saumava Dey
Join Date: Sep 2020
Posts: 29
Rep Power: 6 |
Parts of my code read as:
volScalarField h ( IOobject ( "h", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); ------------------------------------------------------------- fvScalarMatrix h_Eqn ( (rho_frac*F)*fvm::ddt(h) == fvm::laplacian(Ku,h) + rho_frac*grad_Kuz + rhoC_frac*q ); h_Eqn.relax(); h_Eqn.solve(); ------------------------------------------------------------- Now after solving for h, I need to reassign the values of h before it passes on to the next time-step. The values of the h field which are having values less than -1 are to be set to -1. This modified h field has to be passed on the next time step. How to accomplish this? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to read values in a file to a source file? | qkrtjdrns | OpenFOAM Running, Solving & CFD | 3 | April 8, 2020 05:18 |
using chemkin | JMDag2004 | OpenFOAM Pre-Processing | 2 | March 8, 2016 23:38 |
Read gradient values of constantAlphaContactAngle | styleworker | OpenFOAM Programming & Development | 0 | November 25, 2013 09:26 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug | unoder | OpenFOAM Installation | 11 | January 30, 2008 21:30 |