|
[Sponsors] |
is it possible to calculate div (vector,vector) ? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 28, 2020, 12:30 |
is it possible to calculate div (vector,vector) ?
|
#1 |
Member
MNM
Join Date: Aug 2017
Posts: 69
Rep Power: 8 |
Dear Foamers,
I'm trying to compute a source term for the velocity field which is shown in the attached image. So I tried the following way (Here M and H are both vector Fields) but I'm getting an error which is not surprising as If I'm not wrong then OF only calculates the divergence of a vector field with a scalar prefix. But is it possible to calculate something like fvc::div (vector, vector) ? // KELVIN FORCE DENSITY INITIALIZATION Code:
volVectorField KFD = munot*(fvc::div(M, H)); // M dot del H |
|
June 20, 2022, 11:54 |
|
#2 |
Senior Member
Join Date: Dec 2019
Location: Cologne, Germany
Posts: 355
Rep Power: 8 |
Openfoam can calculate divergence from a volVectorField or surfaceScalarFields.
If M*H results a volScalarField, it will probably return an error. Last edited by geth03; June 21, 2022 at 04:14. |
|
June 21, 2022, 03:58 |
|
#3 |
Member
Join Date: Jan 2022
Location: Germany
Posts: 72
Rep Power: 4 |
I would forward you to this page:
https://cpp.openfoam.org/v9/classFoa...ts_1_1div.html But I'm not sure if the math is correct here in your approach. The expression inside the brackets results in which defines a new "Scalar operator" which has to be applied to each component of your vector H. Thats why you dont need the divergence here. Those are the components here of the resulting vector This is not that trivial as someone would assume. I cannot provide a solution right now. But you need to define a function that is calculating the differentials of H and multiply them with M.x(), M.y(), M.z() |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to calculate centerbody thrust of an aerospike nozzle in Fluent | Roh | FLUENT | 5 | February 21, 2022 11:30 |
How to calculate Turbulent Intensity and Hydraulic Diameter for my problem? | Roh | FLUENT | 1 | June 17, 2018 03:12 |
calculate friction factor & nusselt number | soheil1991 | FLUENT | 3 | March 11, 2017 09:30 |
calculate values for eps and k from Re or u????? | sbar | OpenFOAM Pre-Processing | 5 | August 16, 2010 04:10 |
How to calculate Torque for francis turbine | manish | CFX | 4 | March 15, 2007 02:57 |