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

Strategy for coupling equations with newer solvers (OF>= 4)

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2020, 08:52
Default Strategy for coupling equations with newer solvers (OF>= 4)
  #1
New Member
 
Jonathan Berrebi
Join Date: Aug 2018
Posts: 1
Rep Power: 0
jberrebi is on a distinguished road
I have used a solver on OpenFoam 7 for mhd developed by A.Tassone and that is published on the web (initially the code is for OpenfOam 4.X) . To make it simple, it is the icoFoam (version OF >4.0) solver in which the Lorentz force is calculated after the PISO loop.
I have managed to use that solver for a mhd flow in a cylinder. Now, I would like to have a look at the electric potential in a solid surrounding the cylinder. For that I need coupling the mhd equations with the electromagnetic equations in the solid. I have understood that last possibilities of coupling equations (other than heat) were in foam extend 4.1.
So I have installed foam-extend 4.1.
I realised quickly that the solver could not be compiled as it was. Although foam extend is version 4.1, the icoFoam inside it belongs to the older generations of OpenFoam. So in OpenFoam 4.1 we have the newer version of icoFoam while in foam-extend 4.1 only the old version works.
For instance, in foam extend 4.1 there are ddtUEqn and HUEqn instead of just UEqn. If it was only that it would be easy to downgrade the solver written for OpenFoam 4.X. But there are other differences, constraintHbyA and constrainPressure do not exist for older FOAM. At the end I just replaced the whole PISO loop with the older kind of PISO loop and hoped it would be enough (even though I thought there must have been a reason for OpenFoam developers for updating the loop).
But more downgrading was needed: I realised that #includeFunc cannot be used in older versions in controlDict and that symGaussSeidel should also be replaced by something else in fvSolution. The format in the transportProperties file was not the same. Foam extend complained about the brackets. Then I added a "nu" after the "nu" for the viscosity. But it complains as well.
--> FOAM FATAL IO ERROR:
wrong token type - expected Scalar, found on line 20 the word 'nu'
Etc,etc.


At this point, I am ready to change my strategy. So instead of local help in error solving which I might ask for later in another thread, I would like to know if I should persist in adapting the solver for the older foam extend format or if I should instead try to adapt coupling for openFoam 7.
I am thankful for any help as well as for all the help I have had in this forum just by searching key words for my previous issues.
jberrebi is offline   Reply With Quote

Reply

Tags
coupling, foam-extend-4.1, icofoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Guide: Writing Equations in LaTeX on the CFD Online Forums pete Site Help, Feedback & Discussions 27 May 19, 2022 04:19
Types of solvers CFD-Junior Main CFD Forum 6 April 14, 2019 18:25
modelling Differential equations in a udf RikardMNorén Fluent UDF and Scheme Programming 2 October 1, 2013 04:36
Adding equations to existing solvers treima OpenFOAM Programming & Development 0 July 9, 2012 10:46
Poinsot and Lele Characteristic BCS strategy for NS equations Ravikanth Avancha Main CFD Forum 1 March 15, 1999 20:51


All times are GMT -4. The time now is 17:47.