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

setExprFields changing the BC

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 8, 2024, 20:57
Default setExprFields changing the BC
  #1
New Member
 
Virag
Join Date: Sep 2023
Location: Australia
Posts: 1
Rep Power: 0
virag.v.mishra@gmail.com is on a distinguished road
Hi
I wanted to provide hydrostatic pressure under a wave profile as an initial condition. I decided to use the setExprFields method.

My setExprFieldsDict looks like below
readFields ( alpha.water );

_WATERPRESS
{
target value;
expression #{ (alpha.water > 0.5 ? 1025*9.81*mag(pos().z() - 0.6) : 0) #};
dimensions [ kg m^-1 s^-2 ];
}

expressions
(
p_rgh
{
field p_rgh;
create yes;
$_WATERPRESS;
}
);

This does what it is intended to do except that it changes the BC from


=========== ================= =================
.. ground inlet outlet sides top
=========== ================= =================
p_rgh fixedFluxPressure fixedFluxPressure fixedFluxPressure empty totalPressure
=========== ================= =================

To

=========== ============ ============
.. ground inlet outlet sides top
=========== ============ ============
p_rgh calculated calculated calculated empty calculated
=========== ============ ============


How to change only the internal fields, not the BCs?
virag.v.mishra@gmail.com is offline   Reply With Quote

Reply

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
loading issue libraries:libsimpleFunctionObjects.so libsimpleSwakFunctionObjects.so immortality OpenFOAM Pre-Processing 15 April 7, 2024 12:35
setExprFields example to generate an initial velocity field for LES of channel flow fumiya OpenFOAM Running, Solving & CFD 6 January 20, 2022 20:30
[PyFoam] Problems with the new PyFoam release zfaraday OpenFOAM Community Contributions 13 December 9, 2014 18:58
[PyFoam] having problems with pyfoam Installation vitorspadetoventurin OpenFOAM Community Contributions 3 December 2, 2014 07:18
energy changing associated with mass changing Martin duan FLUENT 0 August 6, 2011 12:42


All times are GMT -4. The time now is 22:32.