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

[Other] [foamExtend4.0] Help with coupling some equations

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 27, 2019, 06:53
Exclamation [foamExtend4.0] Help with coupling some equations
  #1
Member
 
Elwardi Fadeli
Join Date: Dec 2016
Location: Boumerdes, Algeria
Posts: 40
Rep Power: 9
ELwardi is on a distinguished road
Hi all,


I've been fiddling with this for quite some time now without a clear success.I really do hope someone could help with this problem of mine.


I was solving a coupled problem in a traditional segregated manner:


Code:

fvScalarMatrix SwEqn
(
     porosity*fvm::ddt(Sw) + fvc::div(phiw)
);

// phiw = phiP + phiG



// Explicit Sw

SwEqn.solve();


fvScalarMatrix pEqn
(   
     fvm::laplacian(-Mf, p) + fvc::div(phiG)
);


pEqn.solve();

phiP = pEqn.flux();


// Then Update fields with phiP and proceed in time

The previous approach sets some constrains on deltaT, so a fully coupled solver is desired.


I'm trying to choose between:
1- Solving these equations (where phiw comports an implicit term) with Newton-Raphson classic method, and
2- Solving them using the block coupled library supplied with foam-extend 4.0


I decided to go step-by-step about this and try to solve the "segregated" problem first ( This may not be possible at all, but it may give valuable insight into matrix construction/solving ).


Code:
// pSw is a 

fvBlockMatrix<vector2> blockM(pSw);



// Define pEqn and SwEqn as defined previously 

// Then



blockM.insertEquation(0,  SwEqn);
blockM.insertEquation(1,  pEqn);


blockM.solve();
// retrieve solution and update BCs
This is still not working for me so I thought there is someone who can help here! Any help is much appreciated.
ELwardi is offline   Reply With Quote

Reply

Tags
block-coupling, coupled, foamextend


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
Fluid Thermal 2-way System Coupling Dynamic Memory Allocation Error Tiger23 CFX 6 February 8, 2020 00:25
2-Way FSI Coupling Error (Oscillating Plate Tutorial) EmiS ANSYS 2 June 29, 2018 09:09
Difference between stagger/coupling iteration and coupling step Jiricbeng CFX 1 September 13, 2016 02:37
Continuity and Momentum Equations for Turbulent Flows alibaig1991 Main CFD Forum 3 March 22, 2016 12:51
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27


All times are GMT -4. The time now is 01:23.