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

Modification of chtMultiRegionFoam solver to compute p instead of p_rgh

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Fauster

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 29, 2023, 06:01
Default Modification of chtMultiRegionFoam solver to compute p instead of p_rgh
  #1
New Member
 
Rachele Zamboni
Join Date: Feb 2023
Posts: 3
Rep Power: 3
rachele is on a distinguished road
Hello everyone,

I have modified the chtMultiRegionFoam solver in particular the pEq to compute p instead of p_rgh in fluid regions. I have used the pEq of pimpleSolver. The solver compile with no errors but testing with a modified version of shell and tube heat exchange tutorial I get the following error:

--> FOAM FATAL ERROR:
LHS and RHS of - have different dimensions
dimensions : [1 0 -1 0 0 0 0] - [0 3 -1 0 0 0 0]

I think it is a problem of not consistent unit of measure in the pEq file but I dont understated where or how to fix it.
Attached Files
File Type: h pEqn.H (5.5 KB, 3 views)
File Type: h UEqn.H (715 Bytes, 1 views)
File Type: h createFluidFields.H (7.1 KB, 2 views)
rachele is offline   Reply With Quote

Old   March 29, 2023, 15:14
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 18
dlahaye is on a distinguished road
Pls. elaborate on what you are trying to accomplish.

p_rgh and p have different physical dimension.

How do you intend to solve for thermodynamics of heat transfer by only solving for p_rgh?
dlahaye is online now   Reply With Quote

Old   May 1, 2023, 15:41
Default
  #3
New Member
 
Paulin FERRO
Join Date: May 2021
Location: France
Posts: 21
Rep Power: 5
pferro is on a distinguished road
Hello,

Rachele wants to solve p (the pressure) instead of p_rgh (the piezzometric pressure) in the solver.

The problem is that you can't use the pEqn of pimpleFoam because there is no gravity in pimpleFoam. In chtMultiRegionFoam the fluid is compressible and "buoyant".

A very long time ago the solver was implemented with p and not p_rgh (OpenFOAM 1.6).

pferro is offline   Reply With Quote

Old   May 1, 2023, 17:29
Default
  #4
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 18
dlahaye is on a distinguished road
Hello,

I fear that I still do not understand the question.

chtMultiRegionFoam solves for the pressure (in N/m^2 = kg (1/m) (1/s^2) in the fluid domain as checking the dimensions for any of the tutorial examples (e.g. 0/p in the reverseBurner tutorials) shows.

I clearly oversee something here.
dlahaye is online now   Reply With Quote

Old   May 2, 2023, 03:19
Default
  #5
Member
 
Paul Palladium
Join Date: Jan 2016
Posts: 94
Rep Power: 10
Fauster is on a distinguished road
no chtMultiRegionFoam solves the piezzometric pressure p_rgh. p is not solved but explicitly calculated from p_rgh.

Quote:
p = p_rgh + rho*gh;
dlahaye likes this.
Fauster is offline   Reply With Quote

Old   May 2, 2023, 03:59
Default
  #6
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 802
Blog Entries: 1
Rep Power: 18
dlahaye is on a distinguished road
Sincere thx for pointing out my mistake.

See e.g. line L82 of https://develop.openfoam.com/Develop...m/fluid/pEqn.H

The question raised by Rachele does remain.

If
Quote:
LHS and RHS of - have different dimensions
dimensions : [1 0 -1 0 0 0 0] - [0 3 -1 0 0 0 0]
then LHS and RHS differ by a density factor? Where exactly does the error occur?
dlahaye is online now   Reply With Quote

Old   May 2, 2023, 15:28
Default
  #7
New Member
 
Paulin FERRO
Join Date: May 2021
Location: France
Posts: 21
Rep Power: 5
pferro is on a distinguished road
incompressible solvers in OpenFOAM solve p/rho and not p.
pferro is offline   Reply With Quote

Old   July 9, 2024, 18:29
Default
  #8
New Member
 
Harsh Anand
Join Date: May 2024
Posts: 12
Rep Power: 2
GeekCFD is on a distinguished road
Hey there,
Could you let me know if you have successfully compiled the solver? I am working on a similar issue and need to get rid of 'p_rgh' as it is creating quite a bit of nuisance in the simulation...
GeekCFD is offline   Reply With Quote

Reply

Tags
chtmultiregionfoam, solver development, solver error


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
Error SIGSEGV using VOF and UDF JERC_UTFSM Fluent UDF and Scheme Programming 14 November 8, 2021 00:17
Fail to converge when solving with a fabricated solution zizhou FLUENT 0 March 22, 2021 07:33
customProperties dictionary for CHTMultiRegionFoam solver PositronCascade OpenFOAM Programming & Development 0 July 20, 2019 12:51
[swak4Foam] Efficient run-time postprocessing: combination of swak4foam and solver modification? letzel OpenFOAM Community Contributions 3 October 22, 2013 11:06
wallHeatFlux utility and chtMultiRegionFoam solver Lada OpenFOAM Post-Processing 4 June 7, 2012 10:46


All times are GMT -4. The time now is 11:59.