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

Any open-source Python CFD library that can handle moving objects?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 17, 2022, 21:25
Default Any open-source Python CFD library that can handle moving objects?
  #1
New Member
 
ON
Join Date: Nov 2022
Posts: 2
Rep Power: 0
cheonghm is on a distinguished road
I'm running design optimization problems in Python and require a CFD solver to compute objectives and their gradients. The problem involves an object (rigid body) going through both translational and rotational motions and a flow going over it.

It seems like OpenFOAM can simulate this type of problem using dynamic meshes...(http://www.wolfdynamics.com/training...s_2021_OF8.pdf)

Is there any open-source Python CFD library that has the same capability?
cheonghm is offline   Reply With Quote

Old   November 18, 2022, 03:52
Default
  #2
Member
 
Join Date: Nov 2019
Posts: 93
Rep Power: 6
FliegenderZirkus is on a distinguished road
Python isn't normally used for writing CFD solvers because it would be much slower than when using, say, C++ or Fortran. But you could do the optimization bit in Python and only call OpenFOAM to execute the CFD solution, can't you?
FliegenderZirkus is offline   Reply With Quote

Old   November 18, 2022, 07:27
Default
  #3
New Member
 
ON
Join Date: Nov 2022
Posts: 2
Rep Power: 0
cheonghm is on a distinguished road
Quote:
Originally Posted by FliegenderZirkus View Post
Python isn't normally used for writing CFD solvers because it would be much slower than when using, say, C++ or Fortran. But you could do the optimization bit in Python and only call OpenFOAM to execute the CFD solution, can't you?
Yes, but this would make the optimization slow because I can only treat the CFD solver as a black box... I want to use gradient-based optimization and possibly implement gradients (adjoints) myself.
cheonghm 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
[swak4Foam] swak4foam for OpenFOAM 4.0 mnikku OpenFOAM Community Contributions 80 May 17, 2022 08:06
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 10:03
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
SparceImage v1.7.x Issue on MAC OS X rcarmi OpenFOAM Installation 4 August 14, 2014 06:42


All times are GMT -4. The time now is 10:34.