Skip to content
Snippets Groups Projects

WIP: Fluctuating Equations non-normalized

Non normalized equations for the variances.

Still need to figure out how to get lattice spacing and whether definition for mu should contain lattice time as well.

Related to walberla/walberla!220 (merged) and implements/enhances #2 (closed)

Edited by Felix Winterhalter

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • 329 326 variances = SymbolGen("variance") if params['fluctuating'] is True else params['fluctuating']
    330 327 correction = fluctuation_correction(lb_method, random_symbol(collision_rule.subexpressions, dim=lb_method.dim),
    331 328 variances)
    329
    332 330 for i, corr in enumerate(correction):
    333 331 collision_rule.main_assignments[i] = Assignment(collision_rule.main_assignments[i].lhs,
    334 332 collision_rule.main_assignments[i].rhs + corr)
    335 333
    334 variances = SymbolGen("variance") if params['fluctuating'] is True else params['fluctuating']
    335 temperature = sp.Symbol("fluctuating_temperature") if params["temperature"] is None else params["temperature"]
    336 variance_equations = fluctuating_variance_equations(method=lb_method,
    337 temperature=temperature,
    338 c_s_sq=params["c_s_sq"],
    339 variances=variances)
  • @bauer There is an issue with Philox being in the equations, see the last pipeline test report. Topological sort seems to fail there.

  • added 1 commit

    • b7fd59af - Only generate variances once

    Compare with previous version

  • added 1 commit

    • ff1b76c5 - Only generate variance equations if temperature is set

    Compare with previous version

  • 326 323 collision_rule = simplification(collision_rule)
    327 324
    328 325 if params['fluctuating']:
    329 variances = SymbolGen("variance") if params['fluctuating'] is True else params['fluctuating']
    326 variances = [v for v, _ in zip(iter(SymbolGen("variance")), lb_method.moments)] if params['fluctuating'] is True else params['fluctuating']
    330 327 correction = fluctuation_correction(lb_method, random_symbol(collision_rule.subexpressions, dim=lb_method.dim),
    331 328 variances)
    329
    332 330 for i, corr in enumerate(correction):
    333 331 collision_rule.main_assignments[i] = Assignment(collision_rule.main_assignments[i].lhs,
    334 332 collision_rule.main_assignments[i].rhs + corr)
    335 333
    334 temperature = sp.Symbol("fluctuating_temperature") if params["temperature"] is None else params["temperature"]
    • I don't like the name "fluctuating_temperature". Of course it is the temperature of the fluctuating LB, but the name sounds like it's a bool that specifies whether you want the temperature to fluctuate or not. Why not just name it "temperature"? It's unlikely any future modification will ever require specifying separate temperatures for the LB method and for the fluctuation algorithm, so the distinction is not needed.

    • I agree with you its not that great. I just didn't want to assume that its the only temperature that will ever be introduced, hence the qualifier. If you also agree that we can just name it "temperature" I'm fine with that.

    • I'm a bit hesitant to just name it temperature. How about passing a dict as the fluctuating parameter if additional options are required?

      Is it correct that one can either pass variance values or temperature values? Could the user also just call create_lb_*(fluctuating=variance_expressions_from_temperature(temperature))

    • Please register or sign in to reply
  • Michael Kuron assigned to @bauer and unassigned @winterhalter

    assigned to @bauer and unassigned @winterhalter

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • mentioned in merge request pystencils!23 (closed)

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading