|
[Sponsors] |
writing of several variables within updateCoeffs() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 25, 2016, 10:44 |
writing of several variables within updateCoeffs()
|
#1 |
Member
Fynn
Join Date: Feb 2016
Posts: 48
Rep Power: 10 |
Hi,
I have the following problem: for an internal boundary the following class returns the velocity at every boundary face. That works fine. But I also want to write an interim value at every boundary face. In the code snippet below it is the quantity 'jout' that I also want to have printed (which is calculated at every boundary face). What I tried was to define another volScalarField registry object jout, with NO_READ and AUTO_WRITE options. But this will not compile, if I refer 'mesh' instead of some function in createFields.H. So any ideas how to extract my jout directly in updateCoeffs? Cheers! Code:
void Foam::explicitFOmembraneVelocityFvPatchVectorField::updateCoeffs() { if(updated()) { return; } { // get the surface normals tmp<vectorField> tvfnf = patch().nf(); const vectorField& vfnf = tvfnf(); // get the pressure field const fvPatchField<scalar>& ppsf = patch().lookupPatchField<volScalarField, scalar>(pName_); scalar rho = rho0_.value(); forAll(ppsf, facei) { // set the velocity operator[](facei) = vfnf[facei] * (A_*(ppsf[facei]-ppsf[fm_[facei]])) / rho; jout = rho*ppsf[facei]; } } |
|
Tags |
objectregistry, read/write, updatecoeffs() |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 03:36 |
TimeVaryingMappedFixedValue | irishdave | OpenFOAM Running, Solving & CFD | 32 | June 16, 2021 07:55 |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
[snappyHexMesh] crash sHM | H25E | OpenFOAM Meshing & Mesh Conversion | 11 | November 10, 2014 12:27 |