diff --git a/lbmpy/creationfunctions.py b/lbmpy/creationfunctions.py index 3e7474dc3732d1ab2341d6a19a6108bc2b6406e4..f7e30b3a96797ebb751726cb9c549c6de7b6c47f 100644 --- a/lbmpy/creationfunctions.py +++ b/lbmpy/creationfunctions.py @@ -177,7 +177,7 @@ from lbmpy.fieldaccess import ( AAEvenTimeStepAccessor, AAOddTimeStepAccessor, CollideOnlyInplaceAccessor, EsoTwistEvenTimeStepAccessor, EsoTwistOddTimeStepAccessor, PdfFieldAccessor, PeriodicTwoFieldsAccessor, StreamPullTwoFieldsAccessor, StreamPushTwoFieldsAccessor) -from lbmpy.fluctuatinglb import add_fluctuations_to_collision_rule, method_with_rescaled_equilibrium_values +from lbmpy.fluctuatinglb import add_fluctuations_to_collision_rule from lbmpy.methods import ( create_mrt3, create_mrt_orthogonal, create_mrt_raw, create_srt, create_trt, create_trt_kbc) from lbmpy.methods.creationfunctions import create_generic_mrt @@ -307,9 +307,6 @@ def create_lb_collision_rule(lb_method=None, optimization={}, **kwargs): if rho_in is not None and isinstance(rho_in, Field): rho_in = rho_in.center - if params['fluctuating']: - lb_method = method_with_rescaled_equilibrium_values(lb_method) - if u_in is not None: density_rhs = sum(lb_method.pre_collision_pdf_symbols) if rho_in is None else rho_in eqs = [Assignment(cqc.zeroth_order_moment_symbol, density_rhs)] diff --git a/lbmpy/fluctuatinglb.py b/lbmpy/fluctuatinglb.py index 833b93fe9699d5cd379b5312a441bfef47e9cd68..ba7aed7deedfc2f91cc399cf8ccde79a082c8106 100644 --- a/lbmpy/fluctuatinglb.py +++ b/lbmpy/fluctuatinglb.py @@ -45,19 +45,6 @@ def fluctuating_variance_from_temperature(method, temperature, c_s_sq=sp.Symbol( for norm, rr in zip(normalization_factors, method.relaxation_rates)] -def method_with_rescaled_equilibrium_values(base_method): - """Re-scales the equilibrium moments by 1 / sqrt(M*w) with moment matrix M and weights w""" - from lbmpy.creationfunctions import create_lb_method_from_existing - - sig_k = abs(base_method.moment_matrix) * sp.Matrix(base_method.weights) - - def modification_rule(moment, eq, rr): - i = base_method.moments.index(moment) - return moment, eq / sp.sqrt(sig_k[i]), rr - - return create_lb_method_from_existing(base_method, modification_rule) - - def fluctuation_correction(method, rng_generator, variances=SymbolGen("variance")): """Returns additive correction terms to be added to the the collided pdfs""" conserved_moments = {sp.sympify(1), *MOMENT_SYMBOLS}