|
[Sponsors] |
August 23, 2017, 05:56 |
Using scalarSemiImplicitSource with PisoFOAM
|
#1 | |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
Dear all,
i've managed to add a scalarTransport solver to my pisoFOAM simulation using the #includeFunc scalarTransport command. This works fine as long as i have an inlet and can define an inlet condition for my scalar value s. Now, for further simulations using cyclic boundaries, i want to implement a scalar source within my domain using the fvOptions dict and the scalarSemiImplicitSource entry. Following the approach taken in multiple thread here in the forum i added the following part to my fvOptions dict. Code:
Tracer { type scalarSemiImplicitSource; active true; //using yes doesn't change anything scalarSemiImplicitSourceCoeffs { selectionMode points; volumeMode absolute; points ( (32 29.1 0.5) (32 29.1 1) (32 29.1 1.5) ); injectionRateSuSp { s (1.0 0); } } } Code:
libs ( "libutilityFunctionObjects.so" ); Quote:
PS: OpenFOAM 4.1 on Ubuntu 16.04 LTS |
||
August 24, 2017, 05:40 |
|
#2 |
Senior Member
|
Hi,
Just a quick response, but I think your scalar would be called Tracer, so I think you need to do this: Code:
injectionRateSuSp { Tracer (1.0 0); } Tom |
|
September 12, 2017, 06:29 |
|
#3 |
New Member
vs
Join Date: Jul 2017
Posts: 3
Rep Power: 9 |
Hi Tom,
I have a similar question regarding fvOptions, I want to add source to the entire domain so i have set the selectionMode to "all". So, do i need to set explicitly the cellSet or cellZone or i can just comment it out like i have done here: src { type scalarSemiImplicitSource; active true; scalarSemiImplicitSourceCoeffs { selectionMode all; // all, cellSet, cellZone, points //cellSet c1; volumeMode specific; // absolute; injectionRateSuSp { src (1 0); } } } Best, vaibhav |
|
September 12, 2017, 06:33 |
|
#4 |
Senior Member
|
Hi vaibhav,
I would suggest you try it first and if it does not work you can provide the error message so we can do debugging, but it seems unnecessary to give a cellZone or cellSet is you use the entire domain. Regards, Tom |
|
September 12, 2017, 06:36 |
|
#5 |
New Member
vs
Join Date: Jul 2017
Posts: 3
Rep Power: 9 |
Thanks Tom for your quick reply! I will try it out now.
|
|
December 1, 2017, 07:23 |
|
#6 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
Hey Foamers,
i managed to include a scalar source term in my fvOptions using scalarSemiImplicitSource. But the scalar added by the source is unbounded. While any other inlet method (fixedValue, setFields) nicely bounds between 0 and 1, the scalar source exceeds the upper bound. Any idea why that is? Last edited by RobertHB; December 1, 2017 at 09:51. |
|
February 7, 2018, 05:34 |
|
#7 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
Please ignore the post #6. Obviously by adding a source, you add to the scalar field.
Coming back to the implemented linear equation where ist the constant part and modifying the scalar field . If is the present field/cell value or the weighted average of all neigbour cells (Pantakar, 1980), why is it that the only equation the fits to the sim. results is ? The simulation shown above does not contain any transport. Neither diffusion nor advection. It simply shows the accumulation of the scalar quantity in one cell. |
|
July 30, 2019, 14:47 |
|
#8 |
Member
James
Join Date: Jan 2014
Posts: 38
Rep Power: 12 |
Hi Robert,
I did something very similar to add mass source term in interFoam. Simulation run fine but I don't see any sourcer term being added in the computation. Could you kindly look where I might have wronged. The fvOptions code is as: injector1 { timeStart 0.1; duration 0.5; selectionMode points; points ( (0.1 0.35 0.0) ); } options { massSource1 { type scalarSemiImplicitSource; active true; scalarSemiImplicitSourceCoeffs { $injector1; volumeMode absolute; //org injectionRateSuSp { rho.water (1.0 0); // kg/s //didn't work } } } } |
|
July 30, 2019, 15:27 |
|
#9 |
Member
James
Join Date: Jan 2014
Posts: 38
Rep Power: 12 |
Hi Robert,
I did something very similar to add mass source term in interFoam. Simulation run fine but I don't see any source term being added in the computational domain when viewing in paraFoam. Could you kindly look where I might have wronged. The fvOptions code is as: Code:
injector1 { timeStart 0.1; duration 0.5; selectionMode points; points ( (0.1 0.35 0.0) ); } options { massSource1 { type scalarSemiImplicitSource; active true; //added from forum scalarSemiImplicitSourceCoeffs { $injector1; volumeMode absolute; injectionRateSuSp { rho.water (1.0 0); // kg/s // } } } } |
|
July 31, 2019, 04:24 |
|
#10 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
As a quick guess i'd say the options { } is not needed. Then your timing from injector1 should go into massSource1 {... in here ...}, whereas selectionMode and points should go into scalarSemiImplicitSourceCoeffs {... in here ...}.
Here is my working source (without timing): Code:
scalarSource { type scalarSemiImplicitSource; active true; scalarSemiImplicitSourceCoeffs { volumeMode specific; selectionMode cellSet; cellSet c0; injectionRateSuSp { T (1 0); } } } and here (LINK) is an OpenFOAM 7.0 example on implementing a timer. See if it helps.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Differences in solution method for pisoFoam and buoyantBoussinesqPisoFoam | mchurchf | OpenFOAM | 7 | August 6, 2023 10:12 |
uRANS - laminar simulation using pisoFoam | cyln | OpenFOAM | 1 | July 15, 2017 19:28 |
How can I get stedaystate solution from pisoFoam? | mykkujinu2201 | OpenFOAM Running, Solving & CFD | 1 | December 8, 2015 08:37 |
pisoFoam, pimpleFoam - Fluent user's questions | RodriguezFatz | OpenFOAM Running, Solving & CFD | 0 | September 4, 2013 05:26 |
pisoFoam compiling error with OF 1.7.1 on MAC OSX | Greg Givogue | OpenFOAM Programming & Development | 3 | March 4, 2011 18:18 |