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

[Solids4Foam] Compressible fluid solver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By bigphil

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2019, 09:16
Default [Solids4Foam] Compressible fluid solver
  #1
New Member
 
Join Date: Nov 2018
Location: Japan
Posts: 17
Rep Power: 7
monnda is on a distinguished road
Hello everyone!

I have been trying to implement cavitatingFoam on solids4Foam but I'm facing a problem. I know no compressible solvers are implemented so I don't know how I could do it.

Corresponding source codes are attached and if somebody can help me it would be very helpful.
Attached Files
File Type: zip cavitatingFluid.zip (9.9 KB, 9 views)
monnda is offline   Reply With Quote

Old   November 11, 2019, 10:21
Default
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi!

What exactly is the problem?

The procedure to create a new fluid/solid model is to find a similar one, then copy it and rename it and check it compiles. Then change the code bit-by-bit and recompile as you go.

Philip
bigphil is offline   Reply With Quote

Old   November 11, 2019, 10:51
Default
  #3
New Member
 
Join Date: Nov 2018
Location: Japan
Posts: 17
Rep Power: 7
monnda is on a distinguished road
My code attached can be compiled without any errors but the problem is the solution I got from the new solver seems wrong. Unfortunately I can't show you the result because it is a confidential research but It is clearly different from the incompressible one. (At least the tendency should be similar.)

I checked my code again and again but I could not find what causing the problem. My guess was my code itself is not correct. My code is mostly identical with the one from foam-extend-4.0 though. I think since it is cavitatingFoam is not for dynamic mesh, it might needs something to change to implement on solids4Foam.
monnda is offline   Reply With Quote

Old   November 11, 2019, 11:10
Default
  #4
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by monnda View Post
My code attached can be compiled without any errors but the problem is the solution I got from the new solver seems wrong. Unfortunately I can't show you the result because it is a confidential research but It is clearly different from the incompressible one. (At least the tendency should be similar.)

I checked my code again and again but I could not find what causing the problem. My guess was my code itself is not correct. Since it is cavitatingFoam is not for dynamic mesh, it might needs something to change to implement on solids4Foam.
Hi,

I have implemented cavitatingFluid for the old fsi toolkit a few month ago as someone else requested:

Compilation Issues with CavitatingFluid FSI Code

It should be easy to make it compatible with solids4Foam code structure.

Note: please carefully check the code line by line before running your case as I never found the time to test it.
Specially when it comes to the dynamic mesh modeling.

Regards,
D. Khazaei
Daniel_Khazaei is offline   Reply With Quote

Old   November 11, 2019, 11:45
Default
  #5
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
I suggest verifying your cavitatingFluid solids4Foam implementation against the cavitatingFoam solver on e.g. the cavitatingFoam tutorial case(s). This will let you check if you ported the code correctly.

As for dynamicMesh, yes the code will need to be modified e.g. look at the difference between icoFoam and icoDyFoam.

Philip
Daniel_Khazaei likes this.
bigphil is offline   Reply With Quote

Old   November 11, 2019, 23:49
Default
  #6
New Member
 
Join Date: Nov 2018
Location: Japan
Posts: 17
Rep Power: 7
monnda is on a distinguished road
Hello,

Thank you very much for sharing your solver, Daniel!
I think your solver is basically the same as mine and I still have a problem.

I checked my code as Philip suggested but I did not find anything wrong.
I cannot show you the whole picture but I attached a picture showing the problem. It's like checkerboard but I don't understand what causes this.
Attached Images
File Type: jpg problem.jpg (80.3 KB, 19 views)
monnda is offline   Reply With Quote

Old   November 12, 2019, 05:45
Default
  #7
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by monnda View Post
Hello,

Thank you very much for sharing your solver, Daniel!
I think your solver is basically the same as mine and I still have a problem.

I checked my code as Philip suggested but I did not find anything wrong.
I cannot show you the whole picture but I attached a picture showing the problem. It's like checkerboard but I don't understand what causes this.
Did you make the required changes for moving mesh?
bigphil is offline   Reply With Quote

Old   November 12, 2019, 11:19
Default
  #8
New Member
 
Join Date: Nov 2018
Location: Japan
Posts: 17
Rep Power: 7
monnda is on a distinguished road
I think I did like it's done in interFluid but still got a wrong result. Maybe it is a specific error for my case so I will test with more simple cases.
monnda is offline   Reply With Quote

Old   November 12, 2019, 21:07
Default
  #9
Senior Member
 
Daniel
Join Date: Mar 2013
Location: Noshahr, Iran
Posts: 348
Rep Power: 21
Daniel_Khazaei will become famous soon enough
Quote:
Originally Posted by monnda View Post
I think I did like it's done in interFluid but still got a wrong result. Maybe it is a specific error for my case so I will test with more simple cases.
Do your fluid model (running in fluid only mode) and foam-extend cavitatingFoam solver produce similar results (I mean literally) for the basic foam-extend tutorial?

If yes then we can make sure that the dynamicMesh is the problem.
Daniel_Khazaei is offline   Reply With Quote

Old   November 12, 2019, 22:22
Default
  #10
New Member
 
Join Date: Nov 2018
Location: Japan
Posts: 17
Rep Power: 7
monnda is on a distinguished road
Quote:
Originally Posted by Daniel_Khazaei View Post
Do your fluid model (running in fluid only mode) and foam-extend cavitatingFoam solver produce similar results (I mean literally) for the basic foam-extend tutorial?

If yes then we can make sure that the dynamicMesh is the problem.
I just checked with cavitatingFoam in foam-extend and also checked with pimpleFoam. And they produced pretty similar results so I can say the problem is in dynamicMesh.
monnda is offline   Reply With Quote

Old   November 13, 2019, 05:34
Default
  #11
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
I suggest you try a dynamicMesh problem without FSI first e.g. you could try directly modify cavitatingFoam, so you can isolate the problem away from solids4Foam/FSI issues.

Philip
bigphil is offline   Reply With Quote

Old   January 10, 2023, 10:11
Default
  #12
New Member
 
Tommaso
Join Date: Jan 2020
Posts: 16
Rep Power: 6
evxta3 is on a distinguished road
Hi,

Does solids4foam-v2.0 support compressible flow solvers? Thanks!
evxta3 is offline   Reply With Quote

Old   February 14, 2023, 05:07
Default
  #13
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,089
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by evxta3 View Post
Hi,

Does solids4foam-v2.0 support compressible flow solvers? Thanks!
Currently, only the weakly-compressible sonicFoam-style fluid solver has been ported; however, the preCICE OpenFOAM adapter can be used to couple the compressible OpenFOAM solvers to solids4foam*.

*disclaimer: I have not done this but I am happy to advise!
bigphil 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
How to use the CFX periodic interface zhihuawan CFX 61 January 15, 2018 16:20
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 17:38
Problem with an old Simulation FrankW CFX 3 February 8, 2016 04:28
Need advice for compressible fluid simulation houkensjtu OpenFOAM Running, Solving & CFD 0 February 2, 2014 07:15
Problem Interface Solid Fluid with wall velocity Solver v12 hills1 CFX 2 October 12, 2009 05:36


All times are GMT -4. The time now is 21:44.