CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Problem with velocity profile varying in time

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

LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2022, 02:33
Default Problem with velocity profile varying in time
New Member
Mexico CIty
Join Date: Jul 2022
Posts: 1
Rep Power: 0
André Silva is on a distinguished road
Hi everybody, im a postgraduate student currently working with openfoam. I have a problem and i can't figure how to solve it, i have this velocity profile,

        type            codedFixedValue;
        value           uniform (0 0 0);
        name   parabolicProfile;
                const fvPatch& boundaryPatch = patch(); 
                const vectorField& Cf = boundaryPatch.Cf(); 
                vectorField& field = *this; 

	        scalar t = this->db().time().value();
	        forAll(Cf, faceI)
	           field[faceI] = vector (sin(t*3.141592/0.2)*0.8*(0.5-0.5*tanh(10.*((200.0*(sqrt(pow(Cf[faceI].y(),2)+pow(Cf[faceI].z(),2))))-1.0))) ,0,0);
as you can see, my profile varies in time (sine function) but I don't know how to "change" this dependence after I arrive certain value, what I want to do is when I arrive to time=0.2[sec] change the profile to another one ( for example for t>0.2[sec] change to U=(0,0,0) and continue the simulation), I think I need to use an IF statement, but I don't know how to do it.

Thank you
André Silva is offline   Reply With Quote


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
Time Varying Velocity Input MFWilliams OpenFOAM Running, Solving & CFD 0 January 12, 2022 15:15
Convergence problem of OF WUYing OpenFOAM Running, Solving & CFD 2 September 20, 2021 11:09
Velocity profile inlet varying with z axis and time HalcyonToast FLUENT 1 October 27, 2020 20:29
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07

All times are GMT -4. The time now is 20:15.