|
[Sponsors] |
![]() |
![]() |
#1 |
New Member
Antonio Suma
Join Date: Sep 2017
Posts: 2
Rep Power: 0 ![]() |
Dear all,
I've a problem with the implementation of an equation caused by incompatibility between different classes. I've to calculate a coefficient which is function of the magnitude of a geometric field vector (E). The resolution dependes from a comparison with a reference value, as shown down. Code:
4.71x10^(-11)*|E/p|^3 for |E/p|<referenceValue 3.32(|E/p|-12500)^0.5 for |E/p|>referenceValue referenceValue=1.4x10^4 I don't know how to proceed. Thank you in advance for your help. Best Regards, Antonio |
|
![]() |
![]() |
![]() |
![]() |
#2 |
New Member
ANKUR GARG
Join Date: Mar 2017
Posts: 23
Rep Power: 9 ![]() |
Hi nellosamr,
First, I want to understand your problem clearly. The Coefficient which you want to calculate is Scalar? And Geometric Field vector is a vector quantity? And what is p here? Thank you very much. Regards, Ankur |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Pierre HORGUE
Join Date: May 2009
Posts: 33
Rep Power: 17 ![]() |
Hi nellosamr,
If referenceValue is a scalar, you can do a loop over the cell like that : Code:
forAll(mesh.C(),celli) { if ((E[celli]/p[celli]) < referenceValue) { newField[celli] = something(E[celli]/p[celli]; } else { // do 2 } } Sincerely, Pierre |
|
![]() |
![]() |
![]() |
![]() |
#4 | ||
New Member
Antonio Suma
Join Date: Sep 2017
Posts: 2
Rep Power: 0 ![]() |
Thank you both in advance for your answer.
Quote:
The coefficient is a dimensionedScalar. The geometricField E is a vector quantity, while the pressure p is a volScalarField. Quote:
Thank you again for your attention and courtesy. Best regards, Antonio |
|||
![]() |
![]() |
![]() |
Tags |
class, comparison, geometricfield |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
mesh file for flow over a circular cylinder | Ardalan | Main CFD Forum | 7 | December 15, 2020 13:06 |
Unit's problem with Finite Element Modeler | Carlos Modesto | ANSYS | 0 | August 28, 2017 10:46 |
[ANSYS Meshing] Problem with specifying first element size in 2D Mesh | sigmundab | ANSYS Meshing & Geometry | 9 | April 14, 2016 09:53 |
Can you help me with a problem in ansys static structural solver? | sourabh.porwal | Structural Mechanics | 0 | March 27, 2016 17:07 |
Problem with Remeshing element | az_f | ANSYS Meshing & Geometry | 1 | July 29, 2010 09:27 |