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

[swak4Foam] "funkySetFields -time" utilitiy not working

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By minecraftgp
  • 1 Post By minecraftgp
  • 1 Post By gschaider
  • 1 Post By minecraftgp
  • 2 Post By gschaider

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 12, 2019, 12:45
Default "funkySetFields -time" utilitiy not working
  #1
New Member
 
Pu Gong
Join Date: Jul 2018
Location: London
Posts: 22
Rep Power: 7
minecraftgp is on a distinguished road
Hi

I was running a case with tracer injection at a specific time step (10s) in a room with "funkySetFields -time 10". But the tracer still injected at the begining of the modelling (0s). Anyone can help?

Cheers
joshmccraney likes this.
minecraftgp is offline   Reply With Quote

Old   August 12, 2019, 13:17
Default
  #2
New Member
 
Pu Gong
Join Date: Jul 2018
Location: London
Posts: 22
Rep Power: 7
minecraftgp is on a distinguished road
My funkySetFieldsDict like this
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  plus                                  |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      funkySetFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


 expressions
 (
	contaminant1
	{
		field tracer;
		expression "100"; 
		condition  "set(contaminant1)";
        }
	contaminant2
    	{
		field tracer;
		expression "100";
		condition  "set(contaminant2)"; 
	}
	contaminant3
	{
		field tracer;
		expression "100"; 
		condition  "set(contaminant3)";
	}
	contaminant4
	{
		field tracer;
		expression "100";
		condition  "set(contaminant4)"; 
	}
	contaminant5
	{
		field tracer;
		expression "100";
		condition  "set(contaminant5)"; 
	}
 );
// ************************************************************************* //
minecraftgp is offline   Reply With Quote

Old   August 12, 2019, 13:21
Default
  #3
New Member
 
Pu Gong
Join Date: Jul 2018
Location: London
Posts: 22
Rep Power: 7
minecraftgp is on a distinguished road
And my running log like this, whatever timestep I used, the funkySetFields always starts from 0s

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1712                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : v1712
Arch   : "LSB;label=32;scalar=64"
Exec   : funkySetFields -time 0.1
Date   : Aug 12 2019
Time   : 17:58:09
Host   : "minecraftgp-HP-EliteDesk-800-G3-TWR"
PID    : 1570
I/O    : uncollated
Case   : /home/minecraftgp/openFoam_case/6.3closedFillingBox/6.3.1singlePlumeTracerPosition/bbpf_sp_bl_t28800
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
swakVersion: 0.4.2 (Release date: 2018-12-29)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


Time = 0
 Using funkySetFieldsDict 



Part: contaminant1
 Modifying field tracer of type volScalarField

 Putting "100" into field tracer at t = "0" if condition "set(contaminant1)" is true

No set contaminant1 at t=0 falling back to 'constant'
 Setting 8 of 103200 cells
 Writing to "tracer"
joshmccraney likes this.
minecraftgp is offline   Reply With Quote

Old   August 13, 2019, 03:27
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by minecraftgp View Post
And my running log like this, whatever timestep I used, the funkySetFields always starts from 0s

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1712                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : v1712
Arch   : "LSB;label=32;scalar=64"
Exec   : funkySetFields -time 0.1
Date   : Aug 12 2019
Time   : 17:58:09
Host   : "minecraftgp-HP-EliteDesk-800-G3-TWR"
PID    : 1570
I/O    : uncollated
Case   : /home/minecraftgp/openFoam_case/6.3closedFillingBox/6.3.1singlePlumeTracerPosition/bbpf_sp_bl_t28800
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
swakVersion: 0.4.2 (Release date: 2018-12-29)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


Time = 0
 Using funkySetFieldsDict 



Part: contaminant1
 Modifying field tracer of type volScalarField

 Putting "100" into field tracer at t = "0" if condition "set(contaminant1)" is true

No set contaminant1 at t=0 falling back to 'constant'
 Setting 8 of 103200 cells
 Writing to "tracer"

You said above that you want to set it at t=10 but your command line option is t=0.1



I'm not quite sure what you want to accomplish. But you've got to be aware: if you set the field at t=10 and the solver starts at t=0 then it will read the t=0 variant and ignore t=10
joshmccraney likes this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   August 13, 2019, 12:38
Default
  #5
New Member
 
Pu Gong
Join Date: Jul 2018
Location: London
Posts: 22
Rep Power: 7
minecraftgp is on a distinguished road
Quote:
Originally Posted by gschaider View Post
You said above that you want to set it at t=10 but your command line option is t=0.1



I'm not quite sure what you want to accomplish. But you've got to be aware: if you set the field at t=10 and the solver starts at t=0 then it will read the t=0 variant and ignore t=10
Thank you for reply Bernhard, t=0.1 was another attempt but it started from t=0 as well.

I dont think I understand how '-time' utility works. For now I set the startTime=0 in controldict. From my understanding the solver should start at t= 0, and then a new field value will be set (or changed) at t=10 by funkySetFields.

By that do you mean I should set the startTime=10s as well?
joshmccraney likes this.
minecraftgp is offline   Reply With Quote

Old   August 13, 2019, 17:02
Default
  #6
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by minecraftgp View Post
Thank you for reply Bernhard, t=0.1 was another attempt but it started from t=0 as well.

I dont think I understand how '-time' utility works. For now I set the startTime=0 in controldict. From my understanding the solver should start at t= 0, and then a new field value will be set (or changed) at t=10 by funkySetFields.

By that do you mean I should set the startTime=10s as well?

FSF is a pure post/preprocessing utility. Which means: you specify a time t=10. It evaluates the expression using the fields it finds in the 10-directory and writes the result there as well


The solver on the other hand reads all it needs to know from the startTime (usually 0) and then runs. It ignores the content of everything else. So whatever is in the 10-directory is ignored (or overwritten)


If you want to "switch on" the tracer at t=10 you'll need a functionObject or a fvOption
joshmccraney and minecraftgp like this.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider 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
findCell() in parallel: not working if location is outside the domain TobiWol OpenFOAM 0 January 10, 2018 14:33
Processor 0 not working vishwesh OpenFOAM Running, Solving & CFD 0 November 17, 2017 03:35
ICEM working directory setting Bogesz CFX 2 October 8, 2008 07:45
Help required on working of Micro-oven aero CFX 4 January 19, 2007 08:21
Error: Unable to retrieve mon from working directo Atit Koonsrisuk CFX 6 February 20, 2004 05:07


All times are GMT -4. The time now is 21:05.