|
[Sponsors] |
Store data in a different field from a custom BC |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 21, 2017, 11:14 |
Store data in a different field from a custom BC
|
#1 |
New Member
Chris
Join Date: Dec 2016
Location: Cambridge, UK
Posts: 2
Rep Power: 0 |
I have a custom boundary condition for a mass diffusion solver of mine. The boundary condition calculates the gradient based on an empirical formula for the outflowing mass flux. I want my end user to be able to view in Paraview the changing outflow mass flux as well as the total quantity of mass escaped (i.e. integral of mass flux with time).
To achieve this, I want to have a separate volScalarField in my solver which holds only this integrated quantity in its boundary field and nothing else. (So in fact I should probably be using a surface field but I'm trying to keep things simple for me for the moment.) My problem is accessing that storage field from within the boundary condition of a different field. So, say I have mass concentration C_T with my custom BC, I need to get a writeable reference to storage field 'store'. The closest I have worked out how to get to this is: Code:
const fvPatchField<scalar>& storageField = patch().lookupPatchField<volScalarField, scalar>("store"); Is there a way of getting a non-const reference? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Utility to export field data | tbrycekelly | OpenFOAM Post-Processing | 1 | November 23, 2024 08:48 |
[General] Extracting ParaView Data into Python Arrays | Jeffzda | ParaView | 30 | November 6, 2023 22:00 |
problems after decomposing for running | alessio.nz | OpenFOAM | 7 | March 5, 2021 05:49 |
External magnetic field data | Richard Lee | FLUENT | 7 | January 11, 2019 05:43 |
UDF vs Custom field function | andrew | FLUENT | 5 | June 24, 2011 11:53 |