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

Modifying interFoam solver: Momentum equation division by density

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2023, 22:52
Default Modifying interFoam solver: Momentum equation division by density
  #1
New Member
 
futer
Join Date: Dec 2023
Location: China
Posts: 4
Rep Power: 2
futerxiaosage is on a distinguished road
Dear members of the forum,

I have modified UEqn in UEqn.H as follows:

volScalarField alpha11 = mesh.lookupObject<volScalarField>("alpha.water");
volScalarField nu_sum=nu1*alpha11+nu2*(1-alpha11);
fvVectorMatrix UEqn
(
fvm::ddt(U) + fvm::div(phi, U)
+ MRF.DDt(U)
- fvm::laplacian(nu_sum,U)
==
fvOptions(U)
);

And I also have modified the pEqn.H as follows:

surfaceScalarField phig
(
(
// mixture.surfaceTensionForce()
- ghf*fvc::snGrad(rho)
)*fvc::interpolate(1/UEqn.A())*mesh.magSf()/fvc::interpolate(rho)
);

Ignoring the influence of surface tension, I have modified the fvm::laplacian in fvm.upper() by dividing the term rho[faci]. However, I have noticed significant differences in the pressure field results compared to the original interFoam solver after the first time step. I would like to understand where the main issue lies and how to make the necessary modifications. Thank you!!!
Attached Images
File Type: jpg picture.jpg (78.1 KB, 11 views)
File Type: png pEqn.H.png (88.6 KB, 8 views)
File Type: png UEqn.H.png (55.4 KB, 6 views)
File Type: png mygausslaplacian.C.png (97.1 KB, 6 views)
futerxiaosage is offline   Reply With Quote

Old   December 12, 2023, 06:36
Default
  #2
New Member
 
futer
Join Date: Dec 2023
Location: China
Posts: 4
Rep Power: 2
futerxiaosage is on a distinguished road
If anyone is interested, I would be glad to engage in a discussion and collaborate on further exploring this issue. It would be beneficial to exchange ideas and insights to find potential solutions and improve the modifications made to UEqn and pEqn.
futerxiaosage is offline   Reply With Quote

Reply

Tags
interfoam solver


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 remove viscosity term from the governing equation in interFoam solver Pasar OpenFOAM Programming & Development 3 February 18, 2022 05:56
Error SIGSEGV using VOF and UDF JERC_UTFSM Fluent UDF and Scheme Programming 14 November 7, 2021 23:17
viscosity term in discetrization momentum equation hans-186 Main CFD Forum 4 April 1, 2013 13:34
error message cuteapathy CFX 14 March 20, 2012 06:45
how to add source-term in momentum equation for interFoam? anon_g OpenFOAM 9 October 18, 2011 12:47


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