CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

[HOW TO] solve the velocity components (Ux and Uy) from 2 equations

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   January 17, 2020, 12:13
Question [HOW TO] solve the velocity components (Ux and Uy) from 2 equations
  #1
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 349
Rep Power: 11
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Hello Foamers,
Based on my previous thread, I'm continuing this new thread !!
Couldn't able to figure out the technique - NO problem with Compilation
I have defined a volVectorField U with two scalar fields Ux and Uy along x and y directions (2D). I want to extract Ux and Uy based on two equations given below.
Quote:
\left [ \frac{\delta v_{y}}{\delta {x}}-\frac{\delta v_{x}}{\delta {y}} \right ] -
\left \{ v_{x} \left [ \frac{\delta}{\delta {y}}(ln(f_{1}+f_{2}\left | \rho v_{x} \right |) \right ] -v_{y} \left [ \frac{\delta}{\delta {x}}(ln(f_{1}+f_{2}\left | \rho v_{x} \right |) \right ]\right \}=0 \ \ \ \ (Eq.3a)

\left [ \frac{\delta v_{y}}{\delta {x}}-\frac{\delta v_{x}}{\delta {y}} \right ] -
\left \{ v_{x} \left [ \frac{\delta}{\delta {y}}(ln(f_{1}+f_{2}\left |  \rho v_{y} \right |) \right ] -v_{y} \left [ \frac{\delta}{\delta  {x}}(ln(f_{1}+f_{2}\left | \rho v_{y} \right |) \right ]\right \}=0 \ \ \ \ (Eq.3b)
I tried defining the above two equations in many ways, but ends with no success. The pressure on the other hand is solved comfortably with no errors.
Equs. (3a and b) is defined in OpenFOAM as,
Quote:
(gradCurlUyx - gradCurlUxy) = (1/0.4343*(f1+(f2*rho*Ux)))*((Ux*gradUxy)-(Uy*gradUxx)); // (Eq.3a)
(gradCurlUyx - gradCurlUxy) = (1/0.4343*(f1+(f2*rho*Uy)))*((Ux*gradUyy)-(Uy*gradUyx)); // (Eq.3b)
//COMPILED WELL - but no change in velocity during post-processing (Attachments)
Previously, I got the comment from one of the foamers that I didn't defined the assignment operator appropriately. It looks to be trivial problem, but I couldn't figured it out so far.
Quote:
solve
(
(gradCurlUyx - gradCurlUxy) == (((Ux*gradUyy)-(Uy*gradUyx))/(0.4343*(f1+(f2*rho*Ux))))
); // Failed when I try to define the velocity equation based on equality operator
ERROR:
ergunFoam.C: In function ‘int main(int, char**)’:
ergunFoam.C:62:88: error: no match for ‘operator==’ in ‘Foam:perator-(const Foam::GeometricField<TypeR, PatchField, GeoMesh>&, const Foam::GeometricField<Type1, PatchField, GeoMesh>&) [with Type1 = double; Type2 = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh; typename
I'm hereby attaching my code and case files.
If anyone have some ideas, kindly do share it to proceed further.
Thank you

**The above equations are referred from the following reference: Equ. (9) expanded as 2 Equs. [Equ. 21 - cylindrical coordinates]
https://aiche.onlinelibrary.wiley.co.../aic.690200519
Attached Images
File Type: png Velocity - no change.png (15.6 KB, 16 views)
File Type: png pressure.png (19.2 KB, 14 views)
Attached Files
File Type: gz ErgunFoam9.tar.gz (6.1 KB, 2 views)
Kummi is offline   Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:11.