|
[Sponsors] |
Rigorous Second Derivative Zero - Boundary Condition |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 26, 2021, 04:52 |
Rigorous Second Derivative Zero - Boundary Condition
|
#1 |
New Member
Join Date: May 2016
Posts: 11
Rep Power: 10 |
Hi All,
I want to set the following condition for T for my problem. i.e. some Flux due to Temperature and Pressure to be equal. I have tried to do this by calling lookupPatchField, then using Tp.snGrad(). Then I read Eugene's post for setting by calling lookupObject then using fvc::grad. I think the difference between fvc::grad and snGrad() is that, fvc::grad use both internalField and patchField, but snGrad() only use the patchField (boundary face and its cell's cell-center). I wonder if using fvc::grad is better(more rigorous) then snGrad(). Eugene's post: Second Derivative Zero - Boundary Condition His code: Code:
void extrapolatedGradientFvPatchScalarField::updateCoeffs() { if (updated()) { return; } word field = this->dimensionedInternalField().name(); vectorField nf = patch().nf(); volVectorField gradField = fvc::grad(db().lookupObject<volScalarField>(field)); gradient() = (nf & gradField.boundaryField()[patch().index()] .patchInternalField()()); fixedGradientFvPatchScalarField::updateCoeffs(); } Code:
void equalGradientFvPatchScalarField::updateCoeffs() { if (updated()) { return; } const fvPatchField<scalar>& Pp = patch().lookupPatchField<volScalarField, scalar>(PName_); gradient() = - Pp.snGrad(); fixedGradientFvPatchScalarField::updateCoeffs(); } Sam |
|
Tags |
boundaries condition, openfoam, user defined boundary |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fatal overflow in linear solver. | iamnotfajar | CFX | 9 | October 28, 2020 05:47 |
Constant mass flow rate boundary condition | sahm | OpenFOAM | 0 | June 20, 2018 23:45 |
My radial inflow turbine | Abo Anas | CFX | 27 | May 11, 2018 02:44 |
External Radiation Boundary Condition for Grid Interface | CFD XUE | FLUENT | 0 | July 9, 2010 03:53 |
External Radiation Boundary Condition (Two sided wall), Grid Interface | CFD XUE | FLUENT | 0 | July 8, 2010 07:49 |