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

UEqn.solve() vs solve(UEqn==-grad(p))

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 27, 2020, 12:56
Default UEqn.solve() vs solve(UEqn==-grad(p))
  #1
New Member
 
Matteo
Join Date: Jan 2019
Posts: 4
Rep Power: 7
Zanco is on a distinguished road
Hi everybody.

For some technical and boring reasons, I have to write down the UEqn in a single fvMatrix for the rhoSimpleFoam solver.

I cannot understand why if I create the UEqn as
Ueqn_global.reset(new fvVectorMatrix(getNLTerm(U)
+ getViscTerm(U)
==
fvOptions(rho, U)
));

and in the end solve it like

uresidual_v = solve(UEqn == -fvc::grad(p)).initialResidual()

everything works fine while in case I construct the UEqn as

Ueqn_global.reset(new fvVectorMatrix(getNLTerm(U)
+ getViscTerm(U)
==
fvOptions(rho, U)
));
Ueqn_global().relax();
fvOptions.constrain(Ueqn_global());

Ueqn_global.reset(new fvVectorMatrix(Ueqn_global()
==
-grad(p)
));

and in the end solve it like

uresidual_v = Ueqn_global().solve().initialResidual();

the convergence cannot be reached and it starts oscillating without stopping anymone.
Can anyone help me please?
Thank you in advance.
Zanco 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
Long output in terminal. ssa_cfd OpenFOAM Running, Solving & CFD 1 March 18, 2019 06:25
DPMFoam - Serious Error --particle-laden flow in simple geometric config benz25 OpenFOAM Running, Solving & CFD 27 December 19, 2017 21:47
How to get grad(p) in OpenFOAM PeterShi OpenFOAM Post-Processing 9 September 10, 2017 14:36
Alter simpleFoam, so that it solves for gradP MaLa OpenFOAM Running, Solving & CFD 0 March 6, 2014 13:54
runtime sample plan: how to get gradP Sylv OpenFOAM Programming & Development 5 September 17, 2013 04:35


All times are GMT -4. The time now is 04:54.