|
[Sponsors] |
May 31, 2021, 09:10 |
Fixed Value BC with operations with fields
|
#1 |
New Member
Join Date: May 2021
Posts: 3
Rep Power: 5 |
Hello everybody
I am a newbie in OpenFOAM trying to develop a boundary condition derived from fixedValue. I would like to impose a value for a field, let's say D, such as each face of the boundary patch assumes the value: Code:
D[faceI] = D.oldTime()[faceI] + DD[faceI] Have you got any suggestions on how I can approach this simple problem? Thank you for any help/suggestion ! - elb Edit: To be more precise in my request, what I've tried to do is modifying the updateCoeffs() function from one of the existing derived BC from fixedValue in the following way: Code:
void calculateTotalField::updateCoeffs() { if (this->updated()) { return; } const volVectorField& Dold = db().lookupObject<volVectorField>("D").oldTime(); const volVectorField& DD = db().lookupObject<volVectorField>("DD"); vectorField disp; disp = Dold.boundaryField()[patch().index()] + DD.boundaryField()[patch().index()]; fvPatchField<vector>::operator==(disp); fixedValueFvPatchVectorField::updateCoeffs(); } Thanks! -elb Last edited by elb31; June 1, 2021 at 05:48. Reason: Increased level of detail in the posed question. |
|
Tags |
boundary condition, fixedvalue, incremental, openfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing PtrList of fields from boundary condition | Diro7 | OpenFOAM Programming & Development | 4 | April 8, 2020 13:58 |
Setting U fixed value at the outlet? | greg.cfd | OpenFOAM Running, Solving & CFD | 0 | April 23, 2015 09:02 |
several fields modified by single boundary condition | schröder | OpenFOAM Programming & Development | 3 | April 21, 2015 06:09 |
Fan Boundary Condition OR Fixed Values or Source Terms | SolarX | FLUENT | 1 | June 9, 2011 05:13 |
Has the pressure to be fixed at one node? | Steve Song | Main CFD Forum | 5 | February 9, 2003 14:14 |