View Issue Details

IDProjectCategoryView StatusLast Update
0001262OpenFOAMBugpublic2015-05-01 16:45
Reportervirag Assigned Touser4 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformRHOSOtherOS Version(please specify)
Summary0001262: codeStream
Descriptionthe codedFixedValue feature which is applicable for the applying custom boundary condition is not applicable for trigonometric functions.
I am trying to apply a transient profile at the inlet using codedFixedValue, but it seem to work only for ramping the BC. I want to apply a sine function.


Steps To Reproduceinlet
{
    type codedFixedValue;
    value uniform 0;
    redirectType ramp;
    code
    #{
        operator==(min(10, 0.1*this->db().time().value()));
    #};
}
TagsNo tags attached.

Activities

user4

2014-04-07 09:03

  ~0003000

Just use 'sin' as you would in any piece of code. E.g. based on the pipeCyclic case:

        code
        #{
            const vector axis(1, 0, 0);

            const scalar omega = 10;

            scalar s = sin(omega*this->db().time().value());

            vectorField v(2.0*this->patch().Cf() ^ axis);
            v.replace(vector::X, s);
            operator==(v);
        #};

Issue History

Date Modified Username Field Change
2014-04-06 19:33 virag New Issue
2014-04-07 09:03 user4 Note Added: 0003000
2014-04-07 09:03 user4 Status new => resolved
2014-04-07 09:03 user4 Resolution open => no change required
2014-04-07 09:03 user4 Assigned To => user4