CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Extracting solenoidal field from 2D velocity field

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes
  • 2 Post By agd
  • 1 Post By FMDenaro
  • 1 Post By Jonas Holdeman

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2016, 10:19
Default Extracting solenoidal field from 2D velocity field
  #1
New Member
 
Join Date: Jan 2016
Posts: 4
Rep Power: 10
NuiMrme is on a distinguished road
Hello everyone, I'm more into computer science but I'm working on a CFD project for the moment, so please bare with me. Here is my question:

I know that I can create a solenidal vector field by taking the curl of another vector field because the divergence of the curl is zero. However 2D vector fields result in a scalar function when taking the curl. So is it possible to transform a known 2D vector field to it's "nearest" divergence-free field by any other way? Thanks in advance
NuiMrme is offline   Reply With Quote

Old   January 13, 2016, 10:53
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by NuiMrme View Post
Hello everyone, I'm more into computer science but I'm working on a CFD project for the moment, so please bare with me. Here is my question:

I know that I can create a solenidal vector field by taking the curl of another vector field because the divergence of the curl is zero. However 2D vector fields result in a scalar function when taking the curl. So is it possible to transform a known 2D vector field to it's "nearest" divergence-free field by any other way? Thanks in advance

no, not at all....
FMDenaro is offline   Reply With Quote

Old   January 13, 2016, 11:04
Default
  #3
New Member
 
Join Date: Jan 2016
Posts: 4
Rep Power: 10
NuiMrme is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
no, not at all....
Thank you for your reply, apparently that can be done by solving Navier-Stockes etc ... but the thing is I only have my velocity field generated by another mean not at all passing by these equations, any other recommendations will be highly appreciated.
NuiMrme is offline   Reply With Quote

Old   January 13, 2016, 11:26
Default
  #4
agd
Senior Member
 
Join Date: Jul 2009
Posts: 357
Rep Power: 18
agd is on a distinguished road
The curl is a vector operator. It cannot return a scalar. What it does return, in the case of a 2D flowfield, is a vector normal to the 2D plane. What you are looking for is variously called the Stokes-Helmholtz or Helmholtz-Hodge or Stokes-Helmholtz-Hodge decomposition.
FMDenaro and NuiMrme like this.
agd is offline   Reply With Quote

Old   January 13, 2016, 11:30
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by agd View Post
The curl is a vector operator. It cannot return a scalar. What it does return, in the case of a 2D flowfield, is a vector normal to the 2D plane. What you are looking for is variously called the Stokes-Helmholtz or Helmholtz-Hodge or Stokes-Helmholtz-Hodge decomposition.

I totally agree , this is a very old theory of the vector calculus.

If you are interested in details you could read the original book of Hodge which is, however, quite complex. I worked on this topic and some useful details are in
https://www.researchgate.net/publica...ary_conditions
NuiMrme likes this.
FMDenaro is offline   Reply With Quote

Old   January 14, 2016, 10:36
Default
  #6
Senior Member
 
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 18
Jonas Holdeman is on a distinguished road
Quote:
Originally Posted by NuiMrme View Post
Hello everyone, I'm more into computer science but I'm working on a CFD project for the moment, so please bare with me. Here is my question:

I know that I can create a solenidal vector field by taking the curl of another vector field because the divergence of the curl is zero. However 2D vector fields result in a scalar function when taking the curl. So is it possible to transform a known 2D vector field to it's "nearest" divergence-free field by any other way? Thanks in advance
I assume you are looking for a computational solution to your problem. Assuming you have velocities on a grid and finite element interpolations of the data, I suggest trying a least-squares fit to the velocity using divergence-free vector finite elements that are already the curl of a stream function. These functions have the orthogonality you need for the projection. Some such 2D elements are described in the following papers.

https://www.researchgate.net/publica...ble_fluid_flow

https://www.researchgate.net/publica...inite_elements

Similarly, you could extract the irrotational part of a field using vector elements which are the gradient of a potential.
NuiMrme likes this.
Jonas Holdeman is offline   Reply With Quote

Old   January 14, 2016, 10:56
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Jonas Holdeman View Post
I assume you are looking for a computational solution to your problem. Assuming you have velocities on a grid and finite element interpolations of the data, I suggest trying a least-squares fit to the velocity using divergence-free vector finite elements that are already the curl of a stream function. These functions have the orthogonality you need for the projection. Some such 2D elements are described in the following papers.

https://www.researchgate.net/publica...ble_fluid_flow

https://www.researchgate.net/publica...inite_elements

Similarly, you could extract the irrotational part of a field using vector elements which are the gradient of a potential.

Hello Jonas,
I have a question about the Finite Element approach you and other authors used. What about if your decomposition is not orthogonal? I mean for example what happen when n.v is not zero at the boundaries and you cannot fulfill the orthogonality constraint.
FMDenaro is offline   Reply With Quote

Old   January 14, 2016, 15:04
Default
  #8
Senior Member
 
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 18
Jonas Holdeman is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Hello Jonas,
I have a question about the Finite Element approach you and other authors used. What about if your decomposition is not orthogonal? I mean for example what happen when n.v is not zero at the boundaries and you cannot fulfill the orthogonality constraint.
The finite elements used in the references are the curl of a potential, and necessarily divergence free. Any interpolated field is necessarily divergence free. The normal component of the basis functions (also used as weight or test functions in the Galerkin method) vanish on the boundary of a patch containing the defining node, satisfying the (n dot v) condition for orthogonality on the patch. This orthogonality derives from the elements, not the problem specification. See the first reference previously mentioned for an example of flow over a step where obviously the normal flow on the boundary is not zero.

So what happens when the field to be interpolated, given at nodes, is not "divergence-free"? The interpolation will be divergence-free at the expense of introducing (perhaps unwanted) in/outflow between the nodes. Notice here I am now talking about interpolations of fixed data, not projections which might give new (consistent) velocity values at the nodes.

But you may be asking, what would happen if the domain is closed and values on the boundary are not consistent net zero flow? The nodal boundary values will be respected, but there will be leakage between the nodes to satisfy the mathematical constraint. Just recognize this as a case of garbage in - garbage out.
Jonas Holdeman is offline   Reply With Quote

Old   January 14, 2016, 15:18
Default
  #9
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Jonas Holdeman View Post
The finite elements used in the references are the curl of a potential, and necessarily divergence free. Any interpolated field is necessarily divergence free. The normal component of the basis functions (also used as weight or test functions in the Galerkin method) vanish on the boundary of a patch containing the defining node, satisfying the (n dot v) condition for orthogonality on the patch. This orthogonality derives from the elements, not the problem specification. See the first reference previously mentioned for an example of flow over a step where obviously the normal flow on the boundary is not zero.

So what happens when the field to be interpolated, given at nodes, is not "divergence-free"? The interpolation will be divergence-free at the expense of introducing (perhaps unwanted) in/outflow between the nodes. Notice here I am now talking about interpolations of fixed data, not projections which might give new (consistent) velocity values at the nodes.

But you may be asking, what would happen if the domain is closed and values on the boundary are not consistent net zero flow? The nodal boundary values will be respected, but there will be leakage between the nodes to satisfy the mathematical constraint. Just recognize this as a case of garbage in - garbage out.
sorry, maybe I was not clear in my question...
I was asking for the case of a divergence-free flow but with not-vanishing normal component of the velocity (of course with total surface integral vanishing). Such a case has no longer the mathematical property of being a decomposition both orthogonal and unique.
FMDenaro is offline   Reply With Quote

Old   January 14, 2016, 16:00
Default
  #10
Senior Member
 
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 18
Jonas Holdeman is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
sorry, maybe I was not clear in my question...
I was asking for the case of a divergence-free flow but with not-vanishing normal component of the velocity (of course with total surface integral vanishing). Such a case has no longer the mathematical property of being a decomposition both orthogonal and unique.
Can one speak of a piecewise decomposition? A discrete decomposition? A decomposition of a discrete space? A space of piecewise solenoidal functions? If talking about a space of functions defined on discrete points, what conditions can you impose on a boundary? What meaning can you attach to "between the nodes"? If one can compute piecewise fields (unique for the method) inconsistent with continuous boundary conditions, what is wrong? The method or the mathematical arguments that say it cannot be done? I seem to remember the Helmholtz decomposition follows from integration by parts. Might the decomposition follow for any space for which integration by parts is defined? There is that matter of uniqueness with regard to solutions of the Laplace equation. And there is the matter of aliasing, where functions are indistinguishable when sampled at a fixed number of points.
Jonas Holdeman is offline   Reply With Quote

Old   January 14, 2016, 16:17
Default
  #11
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Jonas Holdeman View Post
Can one speak of a piecewise decomposition? A discrete decomposition? A decomposition of a discrete space? A space of piecewise solenoidal functions? If talking about a space of functions defined on discrete points, what conditions can you impose on a boundary? What meaning can you attach to "between the nodes"? If one can compute piecewise fields (unique for the method) inconsistent with continuous boundary conditions, what is wrong? The method or the mathematical arguments that say it cannot be done? I seem to remember the Helmholtz decomposition follows from integration by parts. Might the decomposition follow for any space for which integration by parts is defined? There is that matter of uniqueness with regard to solutions of the Laplace equation. And there is the matter of aliasing, where functions are indistinguishable when sampled at a fixed number of points.

yes, you can always perform the decomposition (in continuous or discrete sense), it would turn to be just one between infinite decompositions...but without the orthogonality that fixes the unicity, the discrete error in the velocity enters into the pressure field. So, I was wondering if in Finite Element such an aspect is considered.
FMDenaro is offline   Reply With Quote

Old   January 14, 2016, 17:38
Default
  #12
Senior Member
 
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 18
Jonas Holdeman is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
yes, you can always perform the decomposition (in continuous or discrete sense), it would turn to be just one between infinite decompositions...but without the orthogonality that fixes the unicity, the discrete error in the velocity enters into the pressure field. So, I was wondering if in Finite Element such an aspect is considered.
What appears in the Euler or NSE is the gradient of p. I use Hermite elements for p too, where the DOFs are p and components of grad p. Integrating by parts the other way yields orthogonality when the tangential components of p vanish. So orthogonality is maintained if either the normal component of the velocity or the tangential component of grad p vanish on a patch (which they do with the elements I use). Maybe some day the mathematicians will work out the details of when and why the method works. There are other pressing things for me to do, and at my age I don't feel I have enough time to get into this. . . . But we have gotten off the original subject of this thread.
Jonas Holdeman is offline   Reply With Quote

Old   January 17, 2016, 13:33
Default
  #13
New Member
 
Join Date: Jan 2016
Posts: 4
Rep Power: 10
NuiMrme is on a distinguished road
Quote:
Originally Posted by Jonas Holdeman View Post
I assume you are looking for a computational solution to your problem. Assuming you have velocities on a grid and finite element interpolations of the data, I suggest trying a least-squares fit to the velocity using divergence-free vector finite elements that are already the curl of a stream function. These functions have the orthogonality you need for the projection. Some such 2D elements are described in the following papers.

https://www.researchgate.net/publica...ble_fluid_flow

https://www.researchgate.net/publica...inite_elements

Similarly, you could extract the irrotational part of a field using vector elements which are the gradient of a potential.

I just read that using some transformations in fourrier space, one can separate a vector field into it's irrotational and solenoidal componenets, that should solve my problem right , any confirmation on this ?
NuiMrme is offline   Reply With Quote

Old   January 18, 2016, 04:11
Default
  #14
New Member
 
Join Date: Jan 2016
Posts: 4
Rep Power: 10
NuiMrme is on a distinguished road
Quote:
Originally Posted by NuiMrme View Post
I just read that using some transformations in fourrier space, one can separate a vector field into it's irrotational and solenoidal componenets, that should solve my problem right , any confirmation on this ?
Here is my source http://link.springer.com/article/10....A1026352203836
NuiMrme is offline   Reply With Quote

Old   January 18, 2016, 04:49
Default
  #15
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,773
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
but what are you looking for?
the mathematical basis of the Hodge decomposition has nothing to do with the practical resolving method
FMDenaro 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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 91 December 21, 2022 04:50
A Question About Setting Whole Velocity Field Using "Proflie" in FLUENT adsl17754 FLUENT 5 July 31, 2018 04:29
[Natural Convection] "Infinite" velocity field Vittorio COMSOL 2 April 16, 2016 08:56
importing velocity field instead of solving amin.enr OpenFOAM Running, Solving & CFD 0 November 10, 2015 15:55
velocity of massless particles and velocity of flow field in same coordinate payam_IUST FLUENT 0 October 18, 2009 23:24


All times are GMT -4. The time now is 09:02.