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

Does anyone work with curl in OpenFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By galaad
  • 2 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 15, 2005, 06:07
Default Hi, all. Does anyone work wit
  #1
Member
 
Efimenko Evgenii
Join Date: Mar 2009
Location: Nizhnij Novgorod, Russia
Posts: 52
Rep Power: 17
evgenii is on a distinguished road
Hi, all.
Does anyone work with curl in OpenFoam?
I have some problems with it.
Hope to get some help or advice.

I wrote:

solve(
mu0*fvm::ddt(E)
+ fvc::curl(H)
);

solve(
epsilon0*fvm::ddt(H)
+ fvc::curl(E)
);


E,H - volVectorField, mu0, epsilon0 - dimensionedScalar

When I try to compile following error appears:
no matching function to call for solve(...)

Where am I mistaken?
Thank you.
Eugene
evgenii is offline   Reply With Quote

Old   December 15, 2005, 06:17
Default Hello Eugene, Did you try f
  #2
galaad
Guest
 
Posts: n/a
Hello Eugene,

Did you try fvm instead of fvc:

solve(
mu0*fvm::ddt(E)
+ fvm::curl(H)
);

I think it's not a problem with curl but a syntax problem. Had you also define the equation to solve... for example:

tmp<fvvectormatrix> EEqn
(
mu0*fvm::ddt(E)
+ fvm::curl(H)
);
EEqn().relax();
EEqn().solve();

Try this and tell me :-).

Fred
  Reply With Quote

Old   December 15, 2005, 06:22
Default Or this... tmp
  #3
galaad
Guest
 
Posts: n/a
Or this...

tmp<fvvectormatrix> EEqn
(
mu0*fvm::ddt(E)
==
- fvc::curl(H)
);
EEqn().relax();
EEqn().solve();

The variable to solve in the left part of the equation and the source term on the right one.

Fred
Kummi likes this.
  Reply With Quote

Old   December 15, 2005, 06:31
Default Thank you so much! It's now co
  #4
Member
 
Efimenko Evgenii
Join Date: Mar 2009
Location: Nizhnij Novgorod, Russia
Posts: 52
Rep Power: 17
evgenii is on a distinguished road
Thank you so much! It's now compiling succesfully (How it works I'll know later )
There is only fvc::curl, there's no fvm::curl.
But you are right, I needed to define an equation in manner you gave.
evgenii is offline   Reply With Quote

Old   December 15, 2005, 06:54
Default Curl only comes in the explici
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Curl only comes in the explicit version (fvc) because the implicit one couples the components of the vector. The current matrix support cannot handle that but the new version (block matrix) will come in due course). So, there's no fvm::curl at the moment.

As for the calculation of the curl, have a look at fvcCurl.C. There are two implementations

- the one based on the Gauss Theorem is commented out.

- the one with the Hodge dual is active and allows you to use your favourite gradient calculation algorithm

Enjoy,

Hrv
makaveli_lcf and Kummi like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   December 15, 2005, 07:06
Default Thanks Hrv for your comment an
  #6
galaad
Guest
 
Posts: n/a
Thanks Hrv for your comment and your advices .
  Reply With Quote

Old   December 15, 2005, 07:44
Default Thank for comments Hrv, it is
  #7
Member
 
Efimenko Evgenii
Join Date: Mar 2009
Location: Nizhnij Novgorod, Russia
Posts: 52
Rep Power: 17
evgenii is on a distinguished road
Thank for comments Hrv, it is very useful as usual
evgenii is offline   Reply With Quote

Old   February 14, 2007, 12:31
Default Hi all, i am trying to implem
  #8
New Member
 
Sergej Gorchakov
Join Date: Mar 2009
Location: Germany
Posts: 5
Rep Power: 17
gort is on a distinguished road
Hi all,
i am trying to implement the following equation in the solver
curl(B)=mu0*j
B and j are volVectorField and mu0 is dimensionedScalar
mu0 and j are known.
Corresponding entry in the solver is
solve (fvc::curl(B)==mu0*j)
The "response" of compiler is
error: no match for 'operator==' in 'Foam::fvc::curl(const Foam::GeometricField<type,>&) [with Type = Foam::Vector<double>]() == 0'
/shared/home/gort//OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/cellModelI.H:124 : note: candidates are: bool Foam::operator==(const Foam::cellModel&, const Foam::cellModel&)
/shared/home/gort//OpenFOAM/OpenFOAM-1.3/src/OpenFOAM/lnInclude/edgeI.H:147: note: bool Foam::operator==(const Foam::edge&, const Foam::edge&)

What is the right FOAM syntax for this equation? Will be happy for any advises.

Best regards,
Sergej
gort is offline   Reply With Quote

Old   October 15, 2010, 12:30
Default
  #9
Senior Member
 
Matthias Voß
Join Date: Mar 2009
Location: Berlin, Germany
Posts: 449
Rep Power: 20
mvoss is on a distinguished road
hi,

since this is looong time ago... did you managed to solve your curl(B)=mu0*j with OF ??

neewbie
mvoss is offline   Reply With Quote

Old   April 11, 2018, 05:10
Default
  #10
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 256
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Dear Hrv,
is there a point why Hodge dual is taken in favour of the Gauss reconstruction of curl?
Thank you in advance!
Best regards,
Sasha

Quote:
Originally Posted by hjasak View Post
Curl only comes in the explicit version (fvc) because the implicit one couples the components of the vector. The current matrix support cannot handle that but the new version (block matrix) will come in due course). So, there's no fvm::curl at the moment.

As for the calculation of the curl, have a look at fvcCurl.C. There are two implementations

- the one based on the Gauss Theorem is commented out.

- the one with the Hodge dual is active and allows you to use your favourite gradient calculation algorithm

Enjoy,

Hrv
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   January 23, 2020, 05:14
Default
  #11
Senior Member
 
Kumaresh
Join Date: Oct 2016
Posts: 354
Rep Power: 12
Kummi is on a distinguished road
Send a message via Yahoo to Kummi
Hello Foamers,
It's been a long while - however I have some query related to this thread !!

I am working with curl operator. My equation looks like:
\bigtriangledown \times \vee - \vee \times\bigtriangledown\left [   ln\left ( f_{1}+f_{2}\left | \rho U \right | \right ) \right ] = 0
And for this equation, I written the matrix structure as,
Quote:
{
fvVectorMatrix UEqn
(
dummy*(fvm::ddt(U)) // (1) fvm::ddt(U) // ADDITIONAL implicit term - helps in compilation
+ (fvc::curl(U)) // (2)
- ((U^gradU)/(0.4343*(God))) // (3) volScalarField God = f1+(f2*rho*mag(U)); volVectorField gradU(fvc::grad(God));
);
UEqn.solve();
}
I have compiled successfully, but I couldn't able to predict the velocity - shows constant magnitude during post-processing.


At the top, the similar matrix was created and compiled. In this (Below) vector matrix, after compilation - is there any change in vector variables (E and H) ? not sure. I feel that, its because the curl is defined explicitly.
Quote:
tmp<fvvectormatrix> EEqn
(
mu0*fvm::ddt(E)
==
- fvc::curl(H)
);
EEqn().relax();
EEqn().solve();
As Hrv stated, for implicit curl operators, block matrix implementation seems necessary. Its in Foam-Extend versions based on fully implicit method (FIM).
I haven't worked with it before. Looking ahead !!

If someone have exposed with block matrix method for simple linear equation, as like stated above., kindly share some thoughts and ideas.

Thank you !!

Last edited by Kummi; January 23, 2020 at 09:11.
Kummi is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Curl Velocity Cardero CFX 0 March 5, 2009 11:24
what is Velocity Curl? CFD newbie Main CFD Forum 3 July 4, 2008 14:35
About curl evgenii OpenFOAM Running, Solving & CFD 2 December 14, 2005 09:15
Work anybody with OpenFOAM in Berlin Germany ingolf OpenFOAM Running, Solving & CFD 0 September 21, 2005 09:27
Will OpenFoam work on Xeon segersson OpenFOAM Installation 2 May 2, 2005 09:45


All times are GMT -4. The time now is 06:45.