|
[Sponsors] |
how to implement the unit gradient vector in openfoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 31, 2022, 02:21 |
how to implement the unit gradient vector in openfoam
|
#1 |
New Member
young4of
Join Date: Nov 2021
Posts: 29
Rep Power: 5 |
Dear all,
Recently, I have implemented an equation involving the unit gradient vector, which has the following form, I don't know how to implement it, because it involves the case that the denominator is 0. Is there any good way to solve this problem? Assumed that p is a volScalarField like pressure and I want to calculate the equation n=. Thans for reading my post. Best wishes, Young |
|
February 18, 2023, 17:06 |
|
#2 |
New Member
libya
Join Date: Aug 2022
Posts: 25
Rep Power: 4 |
Did you solve the problem, i am facing the same situation
|
|
February 24, 2023, 09:48 |
|
#3 |
Senior Member
|
Hi,
Around line 122 of interfaceProperties.C, a unit gradient vector of alpha1_ field (scalar value of Volume Of Fluid) is calculated. This might help you. https://www.openfoam.com/documentati...8C_source.html Code:
// Cell gradient of alpha const volVectorField gradAlpha(fvc::grad(alpha1_, "nHat")); // Interpolated face-gradient of alpha surfaceVectorField gradAlphaf(fvc::interpolate(gradAlpha)); // Face unit interface normal surfaceVectorField nHatfv(gradAlphaf/(mag(gradAlphaf) + deltaN_)); Code:
deltaN_ ( "deltaN", 1e-8/cbrt(average(alpha1.mesh().V())) ), |
|
Tags |
gradient, openfoam, unit normal |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Getting Started with OpenFOAM | wyldckat | OpenFOAM | 26 | June 21, 2024 07:54 |
OpenFOAM course for beginners | Jibran | OpenFOAM Announcements from Other Sources | 2 | November 4, 2019 09:51 |
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin | CFDFoundation | OpenFOAM Announcements from Other Sources | 0 | January 4, 2017 07:15 |
UNIGE February 13th-17th - 2107. OpenFOAM advaced training days | joegi.geo | OpenFOAM Announcements from Other Sources | 0 | October 1, 2016 20:20 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |